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

Re: Simplify '--prett=xyz' options

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2009, 20:16 UTC
Message-ID
<7viqgoestz.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.01.0908151236250.3162@localhost.localdomain>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 16 quoted lines
> On Sat, 15 Aug 2009, Thomas Rast wrote:
>
>> Granted, it makes it equivalent to --pretty=tformat:foo, but isn't
>> tformat the better choice in many cases?
>
> Not really. Look at what happens with
>
> 	git log --stat --pretty=format:%s
>
> and then try tformat instead. 'tformat' is broken, as is our current 
> --format=%s.
>
> In other words, all of that crud is totally illogical, and our "short 
> versions" (--oneline and --format=) were done entirely incorrectly (well, 
> --oneline probably has the _right_ semantics, and --pretty=oneline is just 
> wrong, but whatever).
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.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 4 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.