chiark / gitweb /
git-debpush: Support --upstream=TAG (and document it)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 6 Jul 2019 22:54:54 +0000 (23:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Jul 2019 10:18:17 +0000 (11:18 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debpush
git-debpush.1.pod

index e9b64d4a7fb31a0f3eea4daffdb34c26f83ee214..5ffbd52c9e4b54012be49445ea75742e4df013bb 100755 (executable)
@@ -66,7 +66,7 @@ get_file_from_ref () {
 # ---- 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"
@@ -90,6 +90,7 @@ while true; do
         '--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 ;;
@@ -214,9 +215,10 @@ esac
 
 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
index 926e8cd3faeedffda81962b120c6ac0d2e2268aa..f1edf776d64c185d22b41a016722b19e3afdd0f8 100644 (file)
@@ -168,6 +168,15 @@ Note that this need not actually be a branch, but any committish (see
 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