On Mon, Sep 26, 2016 at 09:55:20AM -0700, Junio C Hamano wrote:
> > Instead, we can use parse_object(). Note that this is the
> > same fix done by 94d75d1 (get_short_sha1(): correctly
> > disambiguate type-limited abbreviation, 2013-07-01), but
> > that commit fixed only the committish disambiguator, and
> > left the bug in the treeish one.
> Can you share your secret tool you use to find this kind of thing?
> Yes, the patch from that commit does look very similar to what we
> see in this patch, but I'd love to see "I am fixing an incorrect
> call to lookup-object by replacing it with parse-object; has there
> been a similar fix?" automated ;-)
I wish there was an answer besides "persistence and patience". I was
just finishing up the commit message for the final patch, and noticed
that the tag was not present in the second example output, which happens
to use the tree-ish syntax. And I noticed it was doubly weird that the
same bug did not show up in the test scripts, which look for
committishes. That made me peek at the implementation, and from there it
was an easy `git blame` away.