t9814: fix misconversion from test $a -o $b to test $a || test $b
Spotted-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jul 25, 2014 at 12:44 UTC
e832f7374b66d6d8a25eaab31f87c1ab3cc2d207
1 file changed
+8
-2
t/t9814-git-p4-rename.sh
+8
-2
@@ -177,7 +177,10 @@ test_expect_success 'detect copies' '
177
level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C0*//") &&
178
test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 &&
179
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
180
- test "$src" = file10 || test "$src" = file11 &&
180
+ case "$src" in
181
+ file10 | file11) : ;; # happy
182
+ *) false ;; # not
183
+ &&
184
git config git-p4.detectCopies $(($level + 2)) &&
185
git p4 submit &&
186
p4 filelog //depot/file12 &&
@@ -191,7 +194,10 @@ test_expect_success 'detect copies' '
194
level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C0*//") &&
195
test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 &&
196
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
194
- test "$src" = file10 || test "$src" = file11 || test "$src" = file12 &&
197
+ case "$src" in
198
+ file10 | file11 | file12) : ;; # happy
199
+ *) false ;; # not
200
+ &&
201
git config git-p4.detectCopies $(($level - 2)) &&
202
git p4 submit &&
203
p4 filelog //depot/file13 &&