diff options
author | teor <teor@torproject.org> | 2019-10-23 12:58:15 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-23 13:04:28 +1000 |
commit | 9a3b768faebd5b4c55fe0626f8219b228e98bf0e (patch) | |
tree | 0eb9272faeb4005ddf4324ee9be8c5c1727bac7c /scripts/git | |
parent | 71191fa3dcc29d24aee9a22d1d9f2584316e818f (diff) | |
download | tor-9a3b768faebd5b4c55fe0626f8219b228e98bf0e.tar.gz tor-9a3b768faebd5b4c55fe0626f8219b228e98bf0e.zip |
scripts/git: Pass all unrecognised arguments to git-push-all.sh
This makes the behaviour of git-push-all.sh -n identical to the other
git scripts.
Part of 32216.
Diffstat (limited to 'scripts/git')
-rwxr-xr-x | scripts/git/git-push-all.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh index 7e67f4c96d..1b20a50b7f 100755 --- a/scripts/git/git-push-all.sh +++ b/scripts/git/git-push-all.sh @@ -29,6 +29,8 @@ function usage() echo " CI environment failures, using code that previously passed CI." echo " (default: skip; current: $CURRENT_PUSH_SAME matching branches)" echo " --: pass further arguments to git push." + echo " All unrecognised arguments are passed to git push, but complex" + echo " arguments before -- may be mangled by getopt." echo " (default: git push --atomic, current: $GIT_PUSH)" echo echo " env vars:" @@ -127,9 +129,11 @@ while getopts ":hr:st:" opt; do OPTIND=$((OPTIND - 2)) ;; *) - # Assume we're done with script arguments, - # and git push will handle the option - break + # Make git push handle the option + # This might mangle options with spaces, use -- for complex options + GIT_PUSH="$GIT_PUSH $1" + shift + OPTIND=$((OPTIND - 1)) ;; esac done |