Re: Question about get_cached_commit_buffer()
- From
Jeff King <peff@peff.net>
- Date
- Feb 21, 2018, 18:52 UTC
- Message-ID
- <20180221185204.GA8476@sigill.intra.peff.net>
- In-Reply-To
- <20180221184811.GD4333@sigill.intra.peff.net>
On Wed, Feb 21, 2018 at 01:48:11PM -0500, Jeff King wrote:
Show 11 quoted lines
> > What confuses me about this behavior is that the OID is still shown on the > > repeat (and in the case of `git log --oneline` will not actually have a line > > break between two short-OIDs). I don't believe this behavior is something to > > preserve. > > I think that repeating the oid is intentional; the point is to dump how > the traversal code is hitting the endpoints, even if we do so multiple > times. > > The --oneline behavior just looks like a bug. I think --format is broken > with --show-all, too (it does not show anything!).
I poked at one of the examples a little more closely. I actually think these are not repeats, but simply UNINTERESTING parents that we never needed to look at in our traversal (because we hit a point where everything was UNINTERESTING).
So we are relying not on finish_commit() to have freed the buffer, but on the traversal code to have never parsed those commits in the first place. Which is doubly subtle.
I think the rest of my email stands, though: we should just show the full headers for those commits.
-Peff