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

Re: [PATCH] add pretty format configuration to git log/show/whatchanged

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 2, 2008, 06:20 UTC
Message-ID
<7vve45tzoe.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vr6etvlgm.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> In-tree, there are only two callers that do not use --pretty on the
> command line when calling these three commands:
>
>  * "bisect visualize" calls "git log" when gitk is not available, with the
>    user supplied formatting options.  This is very much Ok --- we actively
>    want your configuration feature for this caller.
>
>  * "git merge --squash" calls "git log" to prepare the commit message
>    template.  This is _not_ Ok, and will be broken if we accept your
>    patch.
>
> So you will need a preliminary patch to "git-merge" _before_ submitting
> this patch to make the latter codepath use "git log --pretty" instead.
> Doing so would have raised _my_ confidence level of the patch that you
> made your best effort not to introduce regression.

I should point out that I did not look at things outside shell scripts, i.e. stuff I do not consider really the core part of the system. I did not look at contrib/ area either.

I suspect the following have calls to show/log/whatchanged and do expect to read the default format out of them, and can be broken by your patch:

 * contrib/emacs/git.el (git-setup-commit-buffer)
 * git-cvsserver.perl (sub update)
There also is a call to git log, but I think it is Ok.
 * contrib/hooks/post-receive (generate_general_email)

You should not blindly trust nor take the above as an exhaustive list; it is just from my quick survey.

Previous: Junio C HamanoNext: Denis Cheng
Message 8 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.