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

Re: About git pretty

From
Stephan Beyer <s-beyer@gmx.net>
Date
Aug 23, 2008, 00:03 UTC
Message-ID
<20080823000336.GB14684@leksak.fem-net>
In-Reply-To
<94a0d4530808221624m26034923pbc1f97cb4c4203d8@mail.gmail.com>
Hi,
Felipe Contreras wrote:
Show 9 quoted lines
> Hi,
> 
> Please read aloud the following commands:
> git log --pretty=short
> git log --pretty=full
> git log --pretty=format:%s
> 
> It is just me or 'pretty full' doesn't exactly convey the meaning of
> the action to execute?
But "pretty short" and "pretty format" is. :)
Show 6 quoted lines
> How about:
> git log --format=short
> git log --format=full
> git log --format=custom:%s
> 
> If you like the idea I can work on a patch.

Because --pretty=<format> is an option taken by many git commands including git plumbing (e.g. rev-list), many scripts will rely on "--pretty" and they all would have to be changed. And --pretty exists since Jan 2005 (see 9d97aa64).

Also, --format is an option available to git-archive and git-for-each-ref with a different intention for each. --pretty exists for several git commands with the same intention for all (I think) -- pretty-printing commit objects.

And, btw, I also do not think that your idea does really solve the "problem" that it always will make sense when you read it aloud.

Thus it seems that --format has no benefit over --pretty at all. :-)

Ahh, another thought: If a new git user is looking for an option to _format_ git-log output, she will surely search the git-log manual page for the word "format", finding

 1. --raw
 2. --shortstat
 3. --abbrev
 4. --full-index
 5. --pretty
  STRIKE!

This makes me wonder if it could make sense to move --pretty up in the git-log manual page, but I do not think renaming it is worth the trouble.

Regards,
  Stephan
-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
Previous: David TweedNext: Felipe Contreras
Message 7 of 11 in “About git pretty”
  1. Felipe ContrerasAug 22, 2008
  2. Junio C HamanoAug 22, 2008
  3. David TweedAug 23, 2008
  4. Junio C HamanoAug 23, 2008
  5. David TweedAug 23, 2008
  6. David TweedAug 23, 2008
  7. Stephan BeyerAug 23, 2008
  8. Felipe ContrerasAug 23, 2008
  9. Johannes SchindelinAug 24, 2008
  10. Junio C HamanoAug 30, 2008
  11. Felipe ContrerasFeb 21, 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.