aboutsummaryrefslogtreecommitdiff
path: root/t/t4012-diff-binary.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-30 13:57:00 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-30 13:57:00 -0700
commit5032e70fc25ff18a3c16fb89d708884104c2d1a3 (patch)
treea1a2f666f1042c36adbe8b66d86973139f917595 /t/t4012-diff-binary.sh
parent295eb2cc473675bafb1b523696a442e6969ccd41 (diff)
parent2ef795b027c10f5e253151106a6fb4265552cc04 (diff)
downloadgit-5032e70fc25ff18a3c16fb89d708884104c2d1a3.tar.xz
Merge branch 'jw/apply-corrupt-location'
"git apply" now reports the name of the input file along with the line number when it encounters a corrupt patch, and correctly resets the line counter when processing multiple patch files. * jw/apply-corrupt-location: apply: report input location in binary and garbage patch errors apply: report input location in header parsing errors apply: report the location of corrupt patches
Diffstat (limited to 't/t4012-diff-binary.sh')
-rwxr-xr-xt/t4012-diff-binary.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
index d1d30ac2a9..97b5ac0407 100755
--- a/t/t4012-diff-binary.sh
+++ b/t/t4012-diff-binary.sh
@@ -68,7 +68,7 @@ test_expect_success 'apply detecting corrupt patch correctly' '
sed -e "s/-CIT/xCIT/" <output >broken &&
test_must_fail git apply --stat --summary broken 2>detected &&
detected=$(cat detected) &&
- detected=$(expr "$detected" : "error.*at line \\([0-9]*\\)\$") &&
+ detected=$(expr "$detected" : "error.*broken:\\([0-9]*\\)\$") &&
detected=$(sed -ne "${detected}p" broken) &&
test "$detected" = xCIT
'
@@ -77,7 +77,7 @@ test_expect_success 'apply detecting corrupt patch correctly' '
git diff --binary | sed -e "s/-CIT/xCIT/" >broken &&
test_must_fail git apply --stat --summary broken 2>detected &&
detected=$(cat detected) &&
- detected=$(expr "$detected" : "error.*at line \\([0-9]*\\)\$") &&
+ detected=$(expr "$detected" : "error.*broken:\\([0-9]*\\)\$") &&
detected=$(sed -ne "${detected}p" broken) &&
test "$detected" = xCIT
'