summaryrefslogtreecommitdiffstats
path: root/builtin/rev-list.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-17 23:59:33 +0100
committerJunio C Hamano <gitster@pobox.com>2010-11-17 23:59:33 +0100
commit07e0a8314d69986d368b08f8b602ac573fa7d9b6 (patch)
tree1c238e3e91d83d3dae5b31eac9bb11f353ed7c60 /builtin/rev-list.c
parentMerge branch 'ks/no-textconv-symlink' (diff)
parentrev-list: handle %x00 NUL in user format (diff)
downloadgit-07e0a8314d69986d368b08f8b602ac573fa7d9b6.tar.xz
git-07e0a8314d69986d368b08f8b602ac573fa7d9b6.zip
Merge branch 'jk/maint-rev-list-nul'
* jk/maint-rev-list-nul: rev-list: handle %x00 NUL in user format
Diffstat (limited to 'builtin/rev-list.c')
-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 158ce1111a..ba27d39f97 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 {