aboutsummaryrefslogtreecommitdiff
path: root/scripts/git/git-push-all.sh
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-08-29 22:53:44 +1000
committerteor <teor@torproject.org>2019-08-29 22:53:44 +1000
commitd0e31b4d1f10279280ce7cc9ece71d17a79ed6b7 (patch)
tree302fe2543356be19ee291b7ca54d45513bd1e87c /scripts/git/git-push-all.sh
parent664e6a392ed0ace86e0182dc25bf365e8e34ed9d (diff)
downloadtor-d0e31b4d1f10279280ce7cc9ece71d17a79ed6b7.tar.gz
tor-d0e31b4d1f10279280ce7cc9ece71d17a79ed6b7.zip
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.
Diffstat (limited to 'scripts/git/git-push-all.sh')
-rwxr-xr-xscripts/git/git-push-all.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh
index 0b3cfcd88e..37a73ec95f 100755
--- a/scripts/git/git-push-all.sh
+++ b/scripts/git/git-push-all.sh
@@ -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"`