Don't clone the whole history if we need just the tip of a single branch
* packages/gen-tarball.sh: Clone only the tip of the required branch for non-GnuPG repos.
This speeds up cloning of non-GnuPG repos by several magnitudes and
saves loads of bandwidth. For GnuPG repos we keep cloning the whole
history because we need an unknown amount of history for calculating
the beta version number.
(cherry picked from commit f2f33ee93777e74ff8b77b28055c53eb3098baf4)