Re: Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent option
- From
Jeff King <peff@peff.net>
- Date
- Jul 23, 2015, 05:48 UTC
- Message-ID
- <20150723054816.GA1917@peff.net>
- In-Reply-To
- <20150723051445.GA24029@peff.net>
On Wed, Jul 22, 2015 at 10:14:45PM -0700, Jeff King wrote:
Show 10 quoted lines
> Script writers should not care here, because they should not be parsing > the output of the porcelain "log" command in the first place. It already > has many gotchas (e.g., log.date, log.abbrevCommit). > > I am sympathetic, though. There are some things that git-log can do that > rev-list cannot, so people end up using it in scripts. I think you can > avoid it with a "rev-list | diff-tree" pipeline, though I'm not 100% > sure if that covers all cases. But I would much rather see a solution > along the lines of making the plumbing cover more cases, rather than > trying to make the porcelain behave in a script.
Ah, I see in a nearby thread that you just recently fixed a problem with git-subtree and log.date, so I see now why you are so interested. :)
And I was also reminded by that usage of why rev-list is annoying in scripts: even with "--format", it insists on writing the "commit ..." header. I wonder if we could fix that...
-Peff