X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=git-debpush;h=5ffbd52c9e4b54012be49445ea75742e4df013bb;hb=4a6f56f6197d76a436c63a2794baf3808687fb2e;hp=74cb4aa1ecd665dd0dc8961aa390a83aa7d8d509;hpb=3868d189b3251aa7f0c307d14dbf5280d808d475;p=dgit.git diff --git a/git-debpush b/git-debpush index 74cb4aa1..5ffbd52c 100755 --- a/git-debpush +++ b/git-debpush @@ -20,7 +20,7 @@ set -e$DGIT_TEST_DEBPUSH_DEBUG set -o pipefail -# PRINCIPLES OF OPERATION +# DESIGN PRINCIPLES # # - do not invoke dgit, do anything involving any tarballs, no network # access except `git push` right at the end @@ -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,10 +215,11 @@ esac upstream_info="" if $upstream; then - # xxx want way to override this - upstream_tag=$(git deborig --just-print --version="$version" \ - | head -n1) - upstream_committish=$(git rev-parse ${upstream_tag}^{}) + 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