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

Re: [PATCH] Add --format that is a synonym to --pretty

From
Jeff King <peff@peff.net>
Date
Feb 24, 2009, 05:45 UTC
Message-ID
<20090224054524.GE4615@coredump.intra.peff.net>
In-Reply-To
<7vprh8mm9k.fsf@gitster.siamese.dyndns.org>
On Mon, Feb 23, 2009 at 09:33:59PM -0800, Junio C Hamano wrote:
> I think the patch suffers from the same problem Felipe's patch had, by
> conflating two issues.  Because it had the ":some string with %" shorthand

Yes, I totally agree they are two separate issues, and it should be two patches.

> If we split this round into two patches, one that makes --format a synonym
> to --pretty, and then another one that allows --{format,pretty}='%h %s',
> and *stop there*, then we wouldn't have difficulties.

Right, and I am OK with that. I just wanted to make sure we were not painting ourselves into a corner for a "patch 3/2" that has been discussed.

Show 6 quoted lines
> I do not think --oneline is a bad idea, but I do not think we should
> explain it as "You can write anything that you can write after '--pretty='
> without 'pretty=' and they mean the same thing".  That's where your
> concern arises from.  You just say "'--pretty=oneline --abbrev-commit' is
> so often used, so we have a shorthand for the whole thing: --oneline",
> without implying anything about other things such as --short or --tformat.

OK. I think that is reasonable. Personally, I would really only care about --oneline, anyway (and I do think a --pretty=%h shorthand should use "tformat"; the extra typing is probably not a big deal if you are doing a big multi-line format).

-Peff
Previous: Junio C HamanoNext: Felipe Contreras
Message 19 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.