Re: [PATCH 3/6] pretty: prepare notes message at a centralized place

2012-10-18 Thread Jeff King
On Wed, Oct 17, 2012 at 10:45:25PM -0700, Junio C Hamano wrote: + if (opt-show_notes) { + int raw; + struct strbuf notebuf = STRBUF_INIT; + + raw = (opt-commit_format == CMIT_FMT_USERFORMAT); + format_display_notes(commit-object.sha1,

Re: [PATCH 3/6] pretty: prepare notes message at a centralized place

2012-10-18 Thread Junio C Hamano
Jeff King p...@peff.net writes: It's possible that switching it would create bugs elsewhere (there are over 100 uses of strbuf_detach, so maybe somebody really does want this NULL behavior), but I tend to think it is just as likely to be fixing undiscovered bugs. Yeah, I tend to agree. This

Re: [PATCH 3/6] pretty: prepare notes message at a centralized place

2012-10-18 Thread Jeff King
On Thu, Oct 18, 2012 at 02:17:01AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: It's possible that switching it would create bugs elsewhere (there are over 100 uses of strbuf_detach, so maybe somebody really does want this NULL behavior), but I tend to think it is just as

[PATCH 3/6] pretty: prepare notes message at a centralized place

2012-10-17 Thread Junio C Hamano
Instead of passing a boolean show_notes around, pass an optional string that is to be inserted after the log message proper is shown. Signed-off-by: Junio C Hamano gits...@pobox.com --- commit.h | 2 +- log-tree.c | 14 +- pretty.c | 9 - 3 files changed, 18