Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration
- From
Jeff King <peff@peff.net>
- Date
- Sep 5, 2008, 00:37 UTC
- Message-ID
- <20080905003710.GA17731@coredump.intra.peff.net>
- In-Reply-To
- <7v7i9r1lnm.fsf@gitster.siamese.dyndns.org>
On Thu, Sep 04, 2008 at 05:28:13PM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> > The whole series looks good to me, and I am happy if it is applied > > as-is. The only question I might raise is whether we want to use "%d" > > for this, or use something longer to anticipate a collision with other > > "d" words (I think you mentioned "describe" at one point). > > How about using "%d()" for this one, so that later enhancements can > specify their features inside parentheses?
I am slightly opposed to that, just because it then is very inconsistent with the other formatting specifiers. I think it is worth introducing a new, consistent syntax, providing that syntax for all specifiers (e.g., %(body), %(decorate)), and then saying "the existing %b, %d, et al are still available and will be available forever. BUT they will never grow the more interesting features like %(body:wrap=80) or %(decorate:delim=, ).
-Peff