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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 3, 2008, 20:59 UTC
Message-ID
<7vsksh9c9m.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080903203616.GB32223@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> On Wed, Sep 03, 2008 at 01:10:12PM -0700, Junio C Hamano wrote:
>
>> I agree with the above reasoning.  If we go with surrounding parentheses,
>> it might even make sense to include a SP _before_ the opening parenthesis,
>> so that "%h %s%d" expands to either of these:
>> 
>>    $ git show -s --pretty=format:'%h %s%d' v1.6.0^0 v1.6.0^1
>>    ea02eef GIT 1.6.0 (refs/tags/v1.6.0)
>>    373a273 Merge git-gui 0.11.0
>
> Isn't that what you argued against in Dscho's version of the patch?
>
>     http://mid.gmane.org/7v1w5exfwb.fsf@gitster.siamese.dyndns.org
Yeah, but unlike Linus, I am not infallible.  Also, I can change my mind.

If the concensus is that we do the simpler variant _now_ and leave extending it for later, I think it is Ok to pick any one reasonable default/simple format, and including the parentheses (with leading SP) would be one reasonable default, certainly more reasonable than not including the parentheses at all.

The background is somewhat different, too.

Back then I didn't think anybody but Dscho was interested in including decorate in --pretty=format in half-baked form. René is comment was to do more flexible but complex variant. I didn't see many people wanted to have it in "limited but usable for simpler needs" form.

It wasn't that urgent, as opposed to this round more people seem to be interested in having it even in a limited form. And I knew Dscho was very much capable of doing the "going whole nine yards" version, instead of a simple-limited one. "If we can afford to spend time to get it right in the first round why not?" was part of the reasons behind my objection.

Previous: Jeff KingNext: Jeff King
Message 5 of 23 in “add '%d' pretty format specifier to show decoration”
  1. 1/2 add '%d' pretty format specifier to show decorationMichael Dressel, Sep 3, 2008
  2. Jeff KingSep 3, 2008
  3. Junio C HamanoSep 3, 2008
  4. Jeff KingSep 3, 2008
  5. Junio C HamanoSep 3, 2008
  6. Jeff KingSep 3, 2008
  7. René ScharfeSep 3, 2008
  8. Jeff KingSep 4, 2008
  9. René ScharfeSep 4, 2008
  10. 1/3 log: add load_ref_decorations()René Scharfe, Sep 4, 2008
  11. 2/3 move load_ref_decorations() to log-tree.c and export itRené Scharfe, Sep 4, 2008
  12. 3/3 add '%d' pretty format specifier to show decorationRené Scharfe, Sep 4, 2008
  13. Jeff KingSep 5, 2008
  14. Junio C HamanoSep 5, 2008
  15. Jeff KingSep 5, 2008
  16. Junio C HamanoSep 5, 2008
  17. Michael DresselSep 5, 2008
  18. Michael DresselSep 9, 2008
  19. René ScharfeSep 9, 2008
  20. René ScharfeSep 5, 2008
  21. Jeff KingSep 3, 2008
  22. Michael DresselSep 3, 2008
  23. Jeff KingSep 3, 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.