From: Junio C Hamano Date: Mon, 23 May 2016 21:54:35 +0000 (-0700) Subject: Merge branch 'jk/test-z-n-unquoted' X-Git-Tag: v2.9.0-rc0~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/dca05bb5913026fb64f6392675e7ab3ff643dcec?ds=inline;hp=-c Merge branch 'jk/test-z-n-unquoted' t9xxx series has been updated primarily for readability, while fixing small bugs in it. A few scripted Porcelains have also been updated to fix possible bugs around their use of "test -z" and "test -n". * jk/test-z-n-unquoted: always quote shell arguments to test -z/-n t9103: modernize test style t9107: switch inverted single/double quotes in test t9107: use "return 1" instead of "exit 1" t9100,t3419: enclose all test code in single-quotes t/lib-git-svn: drop $remote_git_svn and $git_svn_id --- dca05bb5913026fb64f6392675e7ab3ff643dcec diff --combined git-rebase--interactive.sh index 1c6dfb6d56,470413b9f9..9d2bfb7a16 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@@ -82,7 -82,6 +82,7 @@@ rewritten_pending="$state_dir"/rewritte cr=$(printf "\015") strategy_args=${strategy:+--strategy=$strategy} +test -n "$strategy_opts" && eval ' for strategy_opt in '"$strategy_opts"' do @@@ -867,12 -866,12 +867,12 @@@ add_exec_commands () # $3: the input filename check_commit_sha () { badsha=0 - if test -z $1 + if test -z "$1" then badsha=1 else sha1_verif="$(git rev-parse --verify --quiet $1^{commit})" - if test -z $sha1_verif + if test -z "$sha1_verif" then badsha=1 fi