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

Re: About git pretty

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2008, 16:30 UTC
Message-ID
<7vfxom1n54.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0808241948390.24820@pacific.mpi-cbg.de.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 34 quoted lines
>> On Sat, Aug 23, 2008 at 3:03 AM, Stephan Beyer <s-beyer@gmx.net> wrote:
>>
>> > Felipe Contreras wrote:
>> >> 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. :)
>> >
>> >> 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).
>> 
>> Well, it might be difficult, but that doesn't mean it should not be 
>> done. Just like the 'git-*' removal, there could be a period for 
>> transition.
>
> Of course it could be done.  But I do not deem it necessary.  In the 
> balance gain/pain it comes out as not worth the hassle on this guy's 
> calculator.

On the other hand, as an undocumented synonym without deprecating nor conflicting with existing set of options in any way, I do not think it is wrong per-se to support something like:

	git log --format=short
        git log --format=':%h %s'

in addition to existing --pretty. It should be fairly obvious and trivial to make handle_revision_opt() pretend as if the user said --pretty, and for the latter one silently prefix "tformat" while doing so.

I won't be doing such a patch myself, though.
Previous: Johannes SchindelinNext: Felipe Contreras
Message 10 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.