Re: [PATCH 4/4] pretty-print: add --pretty=noexpand
- From
Jeff King <peff@peff.net>
- Date
- Mar 18, 2016, 05:08 UTC
- Message-ID
- <20160318050807.GC22327@sigill.intra.peff.net>
- In-Reply-To
- <xmqqoaacy9tm.fsf_-_@gitster.mtv.corp.google.com>
On Thu, Mar 17, 2016 at 04:16:21PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> It is reasonable for tweak the default output mode for "git log" to > untabify the commit log message, it sometimes may be necessary to > see the output without tab expansion. > > Invent a new --pretty option to do this. Use this to unbreak the > test breakages, where "git shortlog" and output are tested.
Hmm. Isn't "expand tabs" orthogonal to the rest of the pretty format? That is, couldn't one want "--pretty=fuller, but with tabs expanded"?
I don't personally care much myself, and certainly we don't need to support "--expand-tabs" for every format until somebody actually wants them enough to implement it. I just don't want to see us painted into a corner where we have to support an awkward interface forever (e.g., the way we had to retrofit the orthogonal "local" concept onto the --date code).
E.g., start with:
- only CMIT_FMT_MEDIUM expands tabs (and does so by default)
- passing --no-expand-tabs suppresses this behavior
- passing --expand-tabs is an error for now; if people care later,
they can add support for other formats (naively this is trivial, but
I suspect there are some corner cases around things like
--pretty=raw, so unless somebody wants to work on it now, I don't
think we need to).-Peff