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

Re: Considering add log.format and show.format configure option

From
Jeff King <peff@peff.net>
Date
Aug 26, 2022, 07:58 UTC
Message-ID
<Ywh9LUOf9sNlVy4a@coredump.intra.peff.net>
In-Reply-To
<CAOrge3pTP5WU3Z1HRLz7xqExwt7_n33FUkh9KQP2m6VyuA9sJw@mail.gmail.com>
On Fri, Aug 26, 2022 at 03:12:34PM +0800, Zang wrote:
Show 14 quoted lines
> Can we consider add such option to git-config
> 
> [format]
>     mylogformat = <...>
>     myshowformat = <...>
> [log]
>     format = mylogformat
> [show]
>     format = myshowformat
> 
> Which should work same as
> 
> git log --format=mylogformat
> git show --format=myshowformat

I don't think there is any reason not to add something like that. As you note, we already allow overriding the default for all of the log-family commands. So doing it for individual ones is not a stretch.

(I'm not sure if you know, the first half of your suggestion is already available as pretty.*, so this would just be adding log.format, etc, to override format.pretty. Possibly your "format' is just a typo of "pretty" there).

-Peff
Previous: ZangNext: Junio C Hamano
Message 2 of 3 in “Considering add log.format and show.format configure option”
  1. ZangAug 26, 2022
  2. Jeff KingAug 26, 2022
  3. Junio C HamanoAug 26, 2022

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.