From 66f76f761bc38ab61dd068af4b9200b05002305b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 6 Jul 2019 23:51:13 +0100 Subject: [PATCH] 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 Acked-by: Sean Whitton --- git-debpush | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-debpush b/git-debpush index 316d6c1a..e9b64d4a 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 -- 2.30.2