diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 9ea30756f13349c96784f0091da4c3c667166485..470413b9f9b603b8f9fe8718607bf66f6c794cdf 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -866,12 +866,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 diff --git a/git-stash.sh b/git-stash.sh index c7c65e25f50e7b558952a5180081ad499f2a90fc..c7509e8da47cf296143e3fa53a7f431f7672d78e 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -185,7 +185,7 @@ store_stash () { git update-ref --create-reflog -m "$stash_msg" $ref_stash $w_commit ret=$? - test $ret != 0 && test -z $quiet && + test $ret != 0 && test -z "$quiet" && die "$(eval_gettext "Cannot update \$ref_stash with \$w_commit")" return $ret } @@ -277,7 +277,7 @@ save_stash () { git clean --force --quiet -d $CLEAN_X_OPTION fi - if test "$keep_index" = "t" && test -n $i_tree + if test "$keep_index" = "t" && test -n "$i_tree" then git read-tree --reset -u $i_tree fi diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh index ea5ace99a14f7f31b63dfd9cf25123725a525519..9473c2779ef0df109f6943a949583676ea5ceabf 100755 --- a/t/t4151-am-abort.sh +++ b/t/t4151-am-abort.sh @@ -82,7 +82,7 @@ test_expect_success 'am -3 --abort removes otherfile-4' ' test 4 = "$(cat otherfile-4)" && git am --abort && test_cmp_rev initial HEAD && - test -z $(git ls-files -u) && + test -z "$(git ls-files -u)" && test_path_is_missing otherfile-4 '