chiark / gitweb /
git-debpush: cope with spaces in user-supplied upstream tag
[dgit.git] / 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