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

Re: [PATCH] pretty-format: add append line-feed format specifier

From
Jeff King <peff@peff.net>
Date
Sep 9, 2014, 22:31 UTC
Message-ID
<20140909223158.GD14029@peff.net>
In-Reply-To
<540F7C70.4010909@exec64.co.uk>
On Tue, Sep 09, 2014 at 11:17:20PM +0100, Harry Jeffery wrote:
> I definitely prefer your more general solution to my
> bare-minimum-to-scratch-itch patch. I'd certainly be willing to take your
> patch and expand upon it (pun unintended) once Junio has weighed in on your
> suggestions.

Thanks. I am always happy to see contributors willing to pick up and run with ideas.

It is probably out-of-scope for what you want, but while we are talking about %d, it may be worth considering whether there is something simple we can do to make formatting list-like items more flexible. E.g., even with "%D", you are stuck with the format "foo, bar, baz" for multiple decorations. Some kind of "%join(%d,; )" might work to produce "foo; bar; baz" (or whatever you want). But that may also be crossing the line into insanity, and we would be better to allow some Turing-complete embedded language like lua. For that matter, conditionals might be crossing that insanity line, too.

Show 5 quoted lines
> Regardless of what happens with the conditional expansion I think it would
> definitely be a useful addition to be able to print the decorators without
> the " (...)" wrapper. I think it's general enough that it'd warrant its own
> separate patch rather than being part of a patch series for the conditional
> expansion.
Yeah, I agree it can be separate.
-Peff
Previous: Harry JefferyNext: Junio C Hamano
Message 7 of 10 in “pretty-format: add append line-feed format specifier”
  1. pretty-format: add append line-feed format specifierHarry Jeffery, Sep 9, 2014
  2. Junio C HamanoSep 9, 2014
  3. Harry JefferySep 9, 2014
  4. Junio C HamanoSep 9, 2014
  5. Jeff KingSep 9, 2014
  6. Harry JefferySep 9, 2014
  7. Jeff KingSep 9, 2014
  8. Junio C HamanoSep 10, 2014
  9. Jeff KingSep 12, 2014
  10. Junio C HamanoSep 12, 2014

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.