chiark / gitweb /
git-debpush: cope with spaces in user-supplied upstream tag
authorSean Whitton <spwhitton@spwhitton.name>
Wed, 17 Jul 2019 07:55:50 +0000 (08:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Jul 2019 13:12:27 +0000 (14:12 +0100)
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
git-debpush

index 03fc9ce73585a2ea2bfab60088ea58b40265c429..1902fa93f7ff0cab98ba8661efcb9ce0f4435585 100755 (executable)
@@ -323,6 +323,9 @@ EOF
 # ---- Do a git push
 
 if $pushing; then
-    # xxx when user can specify upstream_tag, must cope with spaces
-    git push "$remote" "${push_branch[@]}" $upstream_tag "$debian_tag"
+    if [ "x$upstream_tag" = "x" ]; then
+        git push "$remote" "${push_branch[@]}" "$debian_tag"
+    else
+        git push "$remote" "${push_branch[@]}" "$debian_tag" "$upstream_tag"
+    fi
 fi