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
Jeff King <peff@peff.net>
Date
Sep 3, 2008, 19:36 UTC
Message-ID
<20080903193615.GA31225@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0808202042260.24820@pacific.mpi-cbg.de.mpi-cbg.de>
On Wed, Aug 20, 2008 at 08:43:29PM +0200, Johannes Schindelin wrote:
> Indeed.  When I posted a similar patch, there was some discussion, too.  
> But no resolution, as it seemed nobody was really interested.

I know Junio called you negative, but I actually appreciate having you point out related work (even if I don't get around to reading it for 2 weeks!).

It is funny how similar our patches ended up, even though I didn't even realize yours existed. It looks like the comments were not all that different, either.

To summarize what was said then (for the benefit of Michael, who is moving this forward):

  - Junio didn't like the expansion to include a space and enclosing
    parentheses, because then we don't know where to put the space.
    I agree with that. Though note that you will still end up with an
    extra space for a blank decoration.
  - René suggested a comma delimeter, which Michael's patch does.
  - René suggested a foobar2000-inspired expansion construct for dealing
    with the extra parentheses and space when no decoration exists. If
    we are going to expand the expansion language I think I would prefer
    something more like what show-ref uses (as Jakub suggested), but
    with "tags" expanded so that they can contain arbitrary data. So
    something like:
      %(decorate:delim=, :prefix= (:suffix=\))
    or even:
      %(decorate:+ (%(decorate:delim=, ))
    to use the more shell-ish conditional.
    But I think it is not a problem to introduce '%d' _and_ make such
    improvements later.
  - René also suggested that he wanted a placeholder for git-describe
    output. Logically, this would also want %d. Maybe it is worth making
    this %decorate now to avoid confusion later.
-Peff
Previous: Johannes SchindelinNext: Michael Dressel
Message 9 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.