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

Re: Simplify '--prett=xyz' options

From
Avery Pennarun <apenwarr@gmail.com>
Date
Aug 15, 2009, 21:05 UTC
Message-ID
<32541b130908151405j661cde8fh9783e91cebf1e398@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.01.0908151324380.3162@localhost.localdomain>

On Sat, Aug 15, 2009 at 4:36 PM, Linus Torvalds<torvalds@linux-foundation.org> wrote:

Show 14 quoted lines
> On Sat, 15 Aug 2009, Junio C Hamano wrote:
>> If you try that without --stat, i.e.
>>
>>     $ git log -4 --pretty=format:%s | cat -e
>>     $ git log -4 --pretty=tformat:%s | cat -e
>>
>> I suspect you may then find that --pretty=format (not --pretty=tformat) is
>> broken.
>
> I disagree. The real brokenness is that we don't have any way to say "I
> want no newline at all after the format", and then having this mixup with
> the whole "terminator" thing - sometimes it's "between commits" (which is
> _correct_ any time you have stat info or something), and sometimes it's
> "after header" (which is almost always incorrect).

I'm guessing that "after header" was just an implementation error. It was presumably intended to be "after commit", so that the only difference between format and tformat is the presence or absence of the very last terminator.

Maybe the correct fix is just to make tformat not broken?
Avery
Previous: Linus TorvaldsNext: Linus Torvalds
Message 6 of 9 in “Simplify '--prett=xyz' options”
  1. Linus TorvaldsAug 15, 2009
  2. Thomas RastAug 15, 2009
  3. Linus TorvaldsAug 15, 2009
  4. Junio C HamanoAug 15, 2009
  5. Linus TorvaldsAug 15, 2009
  6. Avery PennarunAug 15, 2009
  7. Linus TorvaldsAug 15, 2009
  8. Linus TorvaldsAug 15, 2009
  9. Johannes SchindelinAug 15, 2009

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.