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