diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-11-24 12:46:32 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-24 12:46:32 -0800 |
commit | e7b9b80e2f82319b80bf99d973463ef6d39e533c (patch) | |
tree | 5fac114d25e917c912fddaedd74309329393e16d /builtin | |
parent | Merge branch 'cb/diff-fname-optim' into maint (diff) | |
parent | rev-list: handle %x00 NUL in user format (diff) | |
download | tgif-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.c | 6 |
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 { |