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

Re: "Medium" log format: change proposal for author != committer

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 16, 2015, 22:25 UTC
Message-ID
<xmqq4mium277.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CA+P7+xqhJKGmxC=35bRvdKSj=nKRhfH9SqhR9ryrcBDknH-Y=w@mail.gmail.com>
Jacob Keller <jacob.keller@gmail.com> writes:
Show 14 quoted lines
> On Tue, Sep 15, 2015 at 6:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>>  * Enhance the "--pretty=format:" thing so that the current set of
>>    hardcoded --pretty=medium,short,... formats and your modified
>>    "medium" can be expressed as a custom format string.
>>
>>  * Introduce a configuration mechanism to allow users to define new
>>    short-hand, e.g. if you have this in your $HOME/.gitconfig:
>>
>>         [pretty "robin"]
>>                 format = "commit %H%nAuthor: %an <%ae>%n..."
>>
>
> Afiak there is already support for this.. from "git help config":

Yup. But before the first bullet item is done, it cannot be used to replace the built-in hardcoded formats with a built-in set of default configurations.

Show 8 quoted lines
>>  * (optional) Replace the hardcoded implementations of pretty
>>    formats with short-hand names like "medium", "short", etc. with a
>>    built-in set of pretty.$name.format using the configuration
>>    mechanism.  But we need to make sure this does not hurt
>>    performance for common cases.
>
> This part obviously hasn't been done, I don't know if any particular
> format is not expressable today by the pretty syntax or not..

One that we know we cannot is the nice conditional one Robin wants. I do think it is a reasonable thing to have.

Previous: Jacob Keller
Message 4 of 4 in “"Medium" log format: change proposal for author != committer”
  1. Robin H. JohnsonSep 15, 2015
  2. Junio C HamanoSep 16, 2015
  3. Jacob KellerSep 16, 2015
  4. Junio C HamanoSep 16, 2015

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.