Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug
Johannes Schindelin
Ævar Arnfjörð Bjarmason
Johannes Schindelin via GitGitGadget
Junio C Hamano
Jeff King
See Also
Prev Ref 1 Ref 2 Ref 3 Ref 4
2019-03-14 00:05:12 UTC
On Wed, Mar 13, 2019 at 11:27:02PM +0100, Johannes Schindelin wrote:

> > 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).