Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2010-10-07 22:25:43 +0400
committerJunio C Hamano <gitster@pobox.com>2010-10-14 05:58:33 +0400
commit9130ac9fe17831445690ebbb60f09b86f96516b3 (patch)
tree36e2c5204978d544b6277526e5a31157acb818c9 /t/t4012-diff-binary.sh
parent7c6eafa35af805578990e76b691ff7f1a25a3c57 (diff)
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4012-diff-binary.sh')
-rwxr-xr-xt/t4012-diff-binary.sh4
1 files changed, 0 insertions, 4 deletions
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