summaryrefslogtreecommitdiff
path: root/t/t4151-am-abort.sh
diff options
context:
space:
mode:
authorArmin Kunaschik <megabreit@googlemail.com>2016-05-09 18:57:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-09 20:45:22 (GMT)
commit2bb051861731a0d8d2a79d0b36857d877f18e476 (patch)
tree2327415fca0577cb4bb2818c6f226327e25bcbe3 /t/t4151-am-abort.sh
parent765428699a5381f113d19974720bc91b5bfeaf1d (diff)
downloadgit-2bb051861731a0d8d2a79d0b36857d877f18e476.zip
git-2bb051861731a0d8d2a79d0b36857d877f18e476.tar.gz
git-2bb051861731a0d8d2a79d0b36857d877f18e476.tar.bz2
t4151: make sure argument to 'test -z' is given
88d50724 (am --skip: revert changes introduced by failed 3way merge, 2015-06-06), unlike all the other patches in the series, forgot to quote the output from "$(git ls-files -u)" when using it as the argument to "test -z", leading to a syntax error on platforms whose test does not interpret "test -z" (no other arguments) as testing if a string "-z" is the null string (which GNU test and test that is built into bash and dash seem to do). Note that $(git ls-files -u | wc -l) is deliberately left unquoted, as some implementations of "wc -l" includes extra blank characters in its output and cannot be compared as string, i.e. "test 0 = $(...)". Signed-off-by: Armin Kunaschik <megabreit@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4151-am-abort.sh')
-rwxr-xr-xt/t4151-am-abort.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index 833e7b2..b878c21 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
'