# ---- Parse command line
getopt=$(getopt -s bash -o 'nfu:' \
- -l 'no-push,force,branch:,remote:,distro:,quilt:,gbp,dpm,\
+ -l 'no-push,force,branch:,remote:,distro:,upstream:,quilt:,gbp,dpm,\
baredebian,baredebian+git,baredebian+tarball' \
-n "$us" -- "$@")
eval "set - $getopt"
'--remote') remote=$2; shift 2; continue ;;
'--distro') distro=$2; shift 2; continue ;;
'--quilt') quilt_mode=$2; shift 2; continue ;;
+ '--upstream') upstream_tag=$2; shift 2; continue ;;
'--baredebian'|'--baredebian+git')
quilt_mode=baredebian; shift; continue ;;
upstream_info=""
if $upstream; then
- # xxx want way to override this
- upstream_tag=$(git deborig --just-print --version="$version" \
- | head -n1)
+ if [ "x$upstream_tag" = x ]; then
+ upstream_tag=$(git deborig --just-print --version="$version" \
+ | head -n1)
+ fi
upstream_committish=$(git rev-parse "refs/tags/${upstream_tag}"^{})
upstream_info=" upstream-tag=$upstream_tag upstream=$upstream_committish"
fi
gitglossary(7)). The option name is chosen to fit what is by far the
most common case.
+=item B<--upstream=>I<TAG>
+
+When pushing a non-native package,
+git-debpush needs a tag for the upstream part of your package.
+
+By default git-debpush asks git-deborig,
+which searches for a suitable tag in your tree,
+based on the upstream version.
+
=item B<--remote=>I<REMOTE>
Where to push tags and branches. If unspecified, use the remote which