diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-06 23:54:54 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-07 11:18:17 +0100 |
commit | 4a6f56f6197d76a436c63a2794baf3808687fb2e (patch) | |
tree | 3530a9bf5d07494bee66fa89a5442e7e9a7ed2ed /git-debpush | |
parent | 66f76f761bc38ab61dd068af4b9200b05002305b (diff) |
git-debpush: Support --upstream=TAG (and document it)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debpush')
-rwxr-xr-x | git-debpush | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git-debpush b/git-debpush index e9b64d4..5ffbd52 100755 --- a/git-debpush +++ b/git-debpush @@ -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 |