diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-11-17 14:59:33 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-17 14:59:33 -0800 |
commit | 07e0a8314d69986d368b08f8b602ac573fa7d9b6 (patch) | |
tree | 1c238e3e91d83d3dae5b31eac9bb11f353ed7c60 /builtin | |
parent | dd9d290bc983255a24c70e26e7fad40c6212b636 (diff) | |
parent | 9130ac9fe17831445690ebbb60f09b86f96516b3 (diff) | |
download | git-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.c | 6 |
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 { |