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

Re: Simplify '--prett=xyz' options

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 15, 2009, 19:19 UTC
Message-ID
<200908152119.56606.trast@student.ethz.ch>
In-Reply-To
<alpine.LFD.2.01.0908151156510.3162@localhost.localdomain>
Linus Torvalds wrote:
Show 10 quoted lines
> 
> I keep on thinking that I can write
> 
> 	git log --format:'%aN: %s'
> 
> instead of using the long-form "--pretty=format:xyz' thing. And each time, 
> I curse myself for being stupid for forgetting the proper format.
> 
> And I'm tired of being stupid. So this patch makes me smart and 
> forward-thinking instead.
But we already have --format="%aN: %s" since these two commits:
commit 36407548a2825462a91b456755412a65fd611fc0
Author: Nanako Shiraishi <nanako3@lavabit.com>
Date:   Tue Feb 24 18:59:15 2009 +0900
    Give short-hands to --pretty=tformat:%formatstring
    Allow --pretty="%h %s" (and --format="%h %s") as shorthand for an often
    used option --pretty=tformat:"%h %s".
    Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit 3a4c1a5e212357c3df030b6713c75466694c2e77
Author: Nanako Shiraishi <nanako3@lavabit.com>
Date:   Tue Feb 24 18:59:14 2009 +0900
    Add --format that is a synonym to --pretty
    Some people prefer to call the pretty-print styles "format", and get
    annoyed to see "git log --format=short" fail.  Introduce it as a synonym
    to --pretty so that both can be used.
    Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

Granted, it makes it equivalent to --pretty=tformat:foo, but isn't tformat the better choice in many cases?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 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.