Re: [PATCH/WIP 0/9] for-each-ref format improvements
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- May 19, 2013, 13:07 UTC
- Message-ID
- <CALkWK0=B+WrXgNq_m_-nk=WYDDbXb1GU15MGNFiDr87ZQAUihw@mail.gmail.com>
- In-Reply-To
- <CACsJy8DhdR-jWQmL1aYSnH=6w9RKGp0_pRnAzvZEPbJ7MSdMtA@mail.gmail.com>
Duy Nguyen wrote:
Show 5 quoted lines
> I don't think you can easily borrow parsing code from pretty-formats > (but I may be wrong). Anyway new stuff with new syntax would look > alien in for-each-ref format lines. Either we bring --pretty to > for-each-ref, leaving all for-each-ref atoms behind in --format, or we > should follow %(..) convention if we add new stuff to --format.
Why so extremist? pretty-formats has %(...), %C(...) as well as %..., so why shouldn't we? Our format is undocumented, and I doubt anyone even uses it; we're not breaking anyone's expectations. I'm just saying that our format can be a little reminiscent of pretty-formats, nothing more. There's no need to borrow parsing code: we can do it ourselves, I think. There is no need to go to the other extreme and throw out the existing --format and start out with a --pretty from scratch either: the current code isn't so bad that we can't build on top of it. Sure, we can eventually deprecate --format and move to --pretty for consistency (but that's a long-term goal).