aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-24 12:46:32 -0800
committerJunio C Hamano <gitster@pobox.com>2010-11-24 12:46:32 -0800
commite7b9b80e2f82319b80bf99d973463ef6d39e533c (patch)
tree5fac114d25e917c912fddaedd74309329393e16d /builtin
parent9cffe2018a8c400cbd50a8aec4eddea97c4ede2f (diff)
parent9130ac9fe17831445690ebbb60f09b86f96516b3 (diff)
downloadgit-e7b9b80e2f82319b80bf99d973463ef6d39e533c.tar.gz
git-e7b9b80e2f82319b80bf99d973463ef6d39e533c.tar.xz
Merge branch 'jk/maint-rev-list-nul' into maint
* jk/maint-rev-list-nul: rev-list: handle %x00 NUL in user format
Diffstat (limited to 'builtin')
-rw-r--r--builtin/rev-list.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 158ce1111..ba27d39f9 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -147,8 +147,10 @@ static void show_commit(struct commit *commit, void *data)
}
} else {
if (revs->commit_format != CMIT_FMT_USERFORMAT ||
- buf.len)
- printf("%s%c", buf.buf, info->hdr_termination);
+ buf.len) {
+ fwrite(buf.buf, 1, buf.len, stdout);
+ putchar(info->hdr_termination);
+ }
}
strbuf_release(&buf);
} else {