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

Re: [PATCH 2/2] allow '%d' pretty format specifier to show decoration

From
MDMichael Dressel <michaeltilodressel@t-online.de>
Date
Aug 20, 2008, 19:51 UTC
Message-ID
<alpine.LNX.1.10.0808202138340.4070@pollux>
In-Reply-To
<20080820180034.GB32005@sigill.intra.peff.net>
On Wed, 20 Aug 2008, Jeff King wrote:
Show 11 quoted lines
> Previously, specifying
>
>  git log --pretty=format:'%H %s' --decorate
>
> would calculate decorations, but not show them. You can now
> do:
>
>  git log --pretty=format:'%H (%d) %s' --decorate
>
> to see them.
>
Wow that was fast! Thanks for the help.

For those who care: I use it in a script to extract the log title of commits between certain tags. And to compile a simple log history of what has changed between tags. It was a bit more tricky than I initially thought it would be, because of merges. So what I do basically is to do a git log A..B where A and B are two of the tags I found using --decorate. My problem was that my script got confused when I had braces in the log title. That was why I wanted to use format in the first place. I know there is a web interface to git which probably does all that, but I wanted to compile an as simple as possible text file.

Cheers, Michael

Previous: Jeff KingNext: Junio C Hamano
Message 10 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.