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

"log --pretty=format:" language

From
TLTeemu Likonen <tlikonen@iki.fi>
Date
Aug 21, 2008, 05:02 UTC
Message-ID
<20080821050223.GA3295@mithlond.arda.local>
In-Reply-To
<20080820180034.GB32005@sigill.intra.peff.net>
Jeff King wrote (2008-08-20 14:00 -0400):
Show 11 quoted lines
> There is a lot of room for discussion here.
> 
> For example:
> 
>   - what should %d show? Right now it shows each decoration, split by
>     commas. It doesn't show the enclosing parentheses automatically.
> 
>     Is this too strict? Should there be some way of pulling out
>     individual decorations from the list, or specifying a different
>     delimiter? If so, probably that should be part of a general
>     improvement in the format expansion macro language.

If such "general improvement" takes place I'd like to point out (most likely old news, but anyway) that %b can't be indented in practical sense. For example, the command

    git log --pretty=format:%x09%s%n%n%x09%b -1 3a634dc
prints this:
        Add hints to revert documentation about other ways to undo changes
        Based on its name, people may read the 'git revert' documentation when
they want to undo local changes, especially people who have used other
SCM's.  'git revert' may not be what they had in mind, but git
provides several other ways to undo changes to files.  We can help
them by pointing them towards the git commands that do what they might
want to do.
[...]
Previous: Michael DresselNext: Jakub Narebski
Message 13 of 14 in “[BUG?] git log does not decorate when custom format is used”
  1. MichaelTiloDressel@t-online.deAug 20, 2008
  2. Jeff KingAug 20, 2008
  3. 1/2 decorate: allow const objects to be decoratedJeff King, Aug 20, 2008
  4. 2/2 allow '%d' pretty format specifier to show decorationJeff King, Aug 20, 2008
  5. Junio C HamanoAug 20, 2008
  6. Johannes SchindelinAug 20, 2008
  7. Junio C HamanoAug 20, 2008
  8. Johannes SchindelinAug 20, 2008
  9. Jeff KingSep 3, 2008
  10. Michael DresselAug 20, 2008
  11. Junio C HamanoAug 20, 2008
  12. Michael DresselAug 20, 2008
  13. "log --pretty=format:" languageTeemu Likonen, Aug 21, 2008
  14. Jakub NarebskiAug 24, 2008

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.