Skip to content

Commit 8bafd20

Browse files
peffgitster
authored andcommitted
t4104: drop hand-rolled error reporting
This use of "||" fools --chain-lint into thinking the &&-chain is broken (and indeed, it is somewhat broken; a failure of update-index in these tests would show the patch file, even if we never got to the part of the test where we fed the patch to git-apply). The extra blocks were there to include more debugging output, but it hardly seems worth it; the user should know which command failed (because git-apply will produce error messages) and can look in the trash directory themselves. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 635ce72 commit 8bafd20

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

t/t4104-apply-boundary.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ do
9595
test_expect_success "apply $kind-patch $with context" '
9696
cat original >victim &&
9797
git update-index victim &&
98-
git apply --index '"$u$kind-patch.$with"' || {
99-
cat '"$kind-patch.$with"'
100-
(exit 1)
101-
} &&
98+
git apply --index '"$u$kind-patch.$with"' &&
10299
test_cmp '"$kind"'-expect victim
103100
'
104101
done
@@ -113,10 +110,7 @@ do
113110
test_expect_success "apply non-git $kind-patch without context" '
114111
cat original >victim &&
115112
git update-index victim &&
116-
git apply --unidiff-zero --index '"$kind-ng.without"' || {
117-
cat '"$kind-ng.without"'
118-
(exit 1)
119-
} &&
113+
git apply --unidiff-zero --index '"$kind-ng.without"' &&
120114
test_cmp '"$kind"'-expect victim
121115
'
122116
done

0 commit comments

Comments
 (0)