Re: [PATCH] pretty format now configurable
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 29, 2008, 20:00 UTC
- Message-ID
- <alpine.LFD.1.00.0802291155550.17889@woody.linux-foundation.org>
- In-Reply-To
- <1204314263-8072-1-git-send-email-crquan@gmail.com>
On Sat, 1 Mar 2008, Denis Cheng wrote:
Show 5 quoted lines
> > rev->abbrev = DEFAULT_ABBREV; > - rev->commit_format = CMIT_FMT_DEFAULT; > + if (fmt_pretty) > + rev->commit_format = get_commit_format(fmt_pretty);
Umm. Now it looks like commit_format isn't initialized at all if fmt_pretty hasn't been set.
Now, it looks like it will have been initialized properly in "init_revisions()", but your commit log doesn't mention that, so it was harder to review this patch than necessary.
Also, can you describe what the background for this is? The reason I ask is that if anybody ever sets that default commit format to anythign else, it will now *seriously* confuse not just users but potentially other git tools too (at least gitk uses "--pretty=raw", but who knows what other tools/scripts are around that just expected the default format).
Linus