git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Denis ChengNext: rae l
Message 2 of 15 in “pretty format now configurable”
  1. pretty format now configurableDenis Cheng, Feb 29, 2008
  2. Linus TorvaldsFeb 29, 2008
  3. rae lMar 1, 2008
  4. add pretty format configuration to git log/show/whatchangedDenis Cheng, Mar 1, 2008
  5. Johannes SchindelinMar 1, 2008
  6. add pretty format configuration to git log/show/whatchangedDenis Cheng, Mar 1, 2008
  7. Junio C HamanoMar 2, 2008
  8. Junio C HamanoMar 2, 2008
  9. 1/3 whatchanged documentation: share description of --pretty with othersDenis Cheng, Mar 2, 2008
  10. 2/3 specify explicit "--pretty=medium" with `git log/show/whatchanged`Denis Cheng, Mar 2, 2008
  11. 3/3 log/show/whatchanged: introduce format.pretty configurationDenis Cheng, Mar 2, 2008
  12. Junio C HamanoMar 2, 2008
  13. rae lMar 2, 2008
  14. Junio C HamanoMar 2, 2008
  15. Johannes SchindelinFeb 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.