chiark / gitweb /
git-debpush: Defend against unexpected git-deborig output
[dgit.git] / git-debpush
index 74cb4aa1ecd665dd0dc8961aa390a83aa7d8d509..e9b64d4a7fb31a0f3eea4daffdb34c26f83ee214 100755 (executable)
@@ -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
@@ -217,7 +217,7 @@ 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}^{})
+    upstream_committish=$(git rev-parse "refs/tags/${upstream_tag}"^{})
     upstream_info=" upstream-tag=$upstream_tag upstream=$upstream_committish"
 fi