From 9130ac9fe17831445690ebbb60f09b86f96516b3 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 7 Oct 2010 14:25:43 -0400 Subject: rev-list: handle %x00 NUL in user format The code paths for showing commits in "git log" and "git rev-list --graph" correctly handle embedded NULs by looking only at the resulting strbuf's length, and never treating it as a C string. The code path for regular rev-list, however, used printf("%s"), which resulted in truncated output. This patch uses fwrite instead, like the --graph code path. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t4012-diff-binary.sh | 4 ---- 1 file changed, 4 deletions(-) (limited to 't/t4012-diff-binary.sh') diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh index bc46563afc..05ec062832 100755 --- a/t/t4012-diff-binary.sh +++ b/t/t4012-diff-binary.sh @@ -77,10 +77,6 @@ test_expect_success 'apply binary patch' \ tree1=`git write-tree` && test "$tree1" = "$tree0"' -nul_to_q() { - perl -pe 'y/\000/Q/' -} - test_expect_success 'diff --no-index with binary creation' ' echo Q | q_to_nul >binary && (: hide error code from diff, which just indicates differences -- cgit v1.2.1