summaryrefslogtreecommitdiff
path: root/git-debpush
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-07-06 23:51:13 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-07-07 11:18:17 +0100
commit66f76f761bc38ab61dd068af4b9200b05002305b (patch)
tree1d925e59938dc2a2f42c576f4318ca829eeede52 /git-debpush
parentd5bbd5fe5b15f40c1153ab2bc3f469e3a49b1daa (diff)
git-debpush: Defend against unexpected git-deborig output
If git-deborig prints something other than a tag name, for example an error message (see #931509), this approach will bomb out, roughly appropriately. This will also become useful when we make upstream_tag overrideable. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'git-debpush')
-rwxr-xr-xgit-debpush2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-debpush b/git-debpush
index 316d6c1..e9b64d4 100755
--- a/git-debpush
+++ b/git-debpush
@@ -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