On Mon, Sep 26, 2016 at 9:36 AM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > This looks very good to me, but I wonder if it couldn't be even more aggressive. > > In particular, the only hashes that most people ever use in short form > are commit hashes. Those are the ones you'd use in normal human > interactions to point to something happening. > > So when the disambiguation notices that there is ambiguity, but there > is only _one_ commit, maybe it should just have an aggressive mode > that says "use that as if it wasn't ambiguous". > > And then have an explicit command (or flag) to do disambiguation for > when you explicitly want it. > > Rationale: you'd never care about short forms for tags. You'd just use > the tag name. And while blob ID's certainly show up in short form in > diff output (in the "index" line), very few people will use them. And > tree hashes are basically never seen outside of any plumbing commands > and then seldom in shortened form. > > So I think it would make sense to default to a mode that just picks > the commit hash if there is only one such hash. Sure, some command > might want a "treeish", but a commit is still more likely than a tree > or a tag. > I'd think we would want to phase this in over a few releases if we do this? Maybe at least sort commits first in the list so that they are faster to spot. I am trying to think of what problems we'd cause by having the behavior be this aggressive... Thanks, Jake > But regardless, this series looks like a good thing. > > Linus