aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-17 14:59:33 -0800
committerJunio C Hamano <gitster@pobox.com>2010-11-17 14:59:33 -0800
commit07e0a8314d69986d368b08f8b602ac573fa7d9b6 (patch)
tree1c238e3e91d83d3dae5b31eac9bb11f353ed7c60 /builtin
parentdd9d290bc983255a24c70e26e7fad40c6212b636 (diff)
parent9130ac9fe17831445690ebbb60f09b86f96516b3 (diff)
downloadgit-07e0a8314d69986d368b08f8b602ac573fa7d9b6.tar.gz
git-07e0a8314d69986d368b08f8b602ac573fa7d9b6.tar.xz
Merge branch 'jk/maint-rev-list-nul'
* 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 {