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

Re: [RFC/PATCH] revision.c: add --format option for 'git log'

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 22, 2009, 18:06 UTC
Message-ID
<7vy6vyxs6j.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7v63j2z7bh.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> ...
>> Well, my hope was to replace --pretty=short with --format=short, but
>> you said that would break other scripts.
>
> It is not just scripts you break.  You also break people's trained
> fingers.
> ...
> The only reason why new --format=<fmt> could be an useful addition is
> because --pretty=format:<fmt> may be too long to type interactively.

An obvious alternative with lessor impact than your patch would be not to introduce an additional option --format, but just make ":" as a synonym to "tformat:". Then you can say "--pretty=:%h %s". You would need to type one colon more but that might conceptually be less confusing, when somebody is starting to learn git *after* this change, without knowing that we did not have --format in earlier versions, from the documentation and existing pages on various web sites.

Previous: Junio C HamanoNext: Felipe Contreras
Message 5 of 23 in “revision.c: add --format option for 'git log'”
  1. revision.c: add --format option for 'git log'Felipe Contreras, Feb 21, 2009
  2. Junio C HamanoFeb 22, 2009
  3. Felipe ContrerasFeb 22, 2009
  4. Junio C HamanoFeb 22, 2009
  5. Junio C HamanoFeb 22, 2009
  6. Felipe ContrerasFeb 22, 2009
  7. Junio C HamanoFeb 22, 2009
  8. Felipe ContrerasFeb 22, 2009
  9. Junio C HamanoFeb 23, 2009
  10. Felipe ContrerasFeb 24, 2009
  11. Felipe ContrerasFeb 24, 2009
  12. Junio C HamanoFeb 24, 2009
  13. Nanako ShiraishiFeb 24, 2009
  14. Junio C HamanoFeb 24, 2009
  15. Felipe ContrerasFeb 24, 2009
  16. Add --format that is a synonym to --prettyNanako Shiraishi, Feb 24, 2009
  17. Jeff KingFeb 24, 2009
  18. Junio C HamanoFeb 24, 2009
  19. Jeff KingFeb 24, 2009
  20. Felipe ContrerasFeb 24, 2009
  21. Linus TorvaldsFeb 22, 2009
  22. Jakub NarebskiFeb 22, 2009
  23. Wincent ColaiutaFeb 23, 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.