scripts/git: Quote shell arguments where possible

Most shell arguments should be quoted to avoid mistakes.

But since all branch names are hard-coded, or supplied by the script user,
we don't need to be too concerned about command injection.

Quoting all shell arguments would take a major refactor.
(Probably using arrays.)

Part of 31314.
This commit is contained in:
teor
2019-08-29 22:53:44 +10:00
parent 664e6a392e
commit d0e31b4d1f
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ fi
if [ "$PUSH_SAME" -eq 0 -a "$TEST_BRANCH_PREFIX" ]; then
NEW_PUSH_BRANCHES=
for b in $PUSH_BRANCHES; do
PUSH_COMMIT=`git rev-parse $b`
PUSH_COMMIT=`git rev-parse "$b"`
SKIP_UPSTREAM=
for u in $DEFAULT_UPSTREAM_BRANCHES $UPSTREAM_BRANCHES; do
UPSTREAM_COMMIT=`git rev-parse "$u"`