Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug
- From
Jeff King <peff@peff.net>
- Date
- Mar 14, 2019, 00:05 UTC
- Message-ID
- <20190314000511.GA31968@sigill.intra.peff.net>
- In-Reply-To
- <nycvar.QRO.7.76.6.1903132322420.41@tvgsbejvaqbjf.bet>
On Wed, Mar 13, 2019 at 11:27:02PM +0100, Johannes Schindelin wrote:
Show 6 quoted lines
> > We have get_oid_commit() and get_oid_committish() already. Should rebase > > just be using those? (I think we probably want "commit()", because we do > > not expect a "pick" line to have a tag, for example. > > I did think about this while developing this patch series, and decided > against conflating concerns.
Yeah, I'd definitely agree it is a separate topic.
> And I was totally right to do so! Because I do have an internal ticket > that talks about allowing `reset v2.20.1`, which is a tag, not a commit.
Thanks for that example. I agree it's plausible for somebody to be using a tag there, so committish() is probably the better option.
(It also doesn't really hurt disambiguation much; in any given repo, commits tend to be dwarfed by trees and blobs by an order of magnitude, and tags are even an order of magnitude smaller than commits).
-Peff