Skip to contentSkip to conversation

t4205: fix typo in 'NUL termination with --stat'

PATCH In review Kousik Sanagavarapu 2 participants 2 messages Oct 20, 2024 – Oct 21, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t4205: fix typo in 'NUL termination with --stat'

Correct "expected" to rightly terminate with NUL ie '\0' instead of '0' which may have been typoed.

We didn't notice this before because the test is run with "test_expect_failure", meaning the test would have been marked broken anyways.

---
 t/t4205-log-pretty-formats.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t4205-log-pretty-formats.sh +1 -1
index eb63ce011f..57b8b79738 100755
@@ -137,7 +137,7 @@ test_expect_success 'NUL separation with --stat' '
 test_expect_failure 'NUL termination with --stat' '
 	stat0_part=$(git diff --stat HEAD^ HEAD) &&
 	stat1_part=$(git diff-tree --no-commit-id --stat --root HEAD^) &&
-	printf "add bar\n$stat0_part\n\0$(commit_msg)\n$stat1_part\n0" >expected &&
+	printf "add bar\n$stat0_part\n\0$(commit_msg)\n$stat1_part\n\0" >expected &&
 	git log -z --stat --pretty="tformat:%s" >actual &&
 	test_cmp expected actual
 '
Signature · 1 line
2.47.0.107.g34b6ce9b30
#1 lore raw
Quoted 2 lines · Kousik Sanagavarapu
 t/t4205-log-pretty-formats.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for finding and fixing. Let's merge this one down.

Thanks,
Taylor