From: Linus Torvalds Date: Sun, 01 May 2005 23:23:58 GMT Subject: Re: Complete http-pull; where should it go? Message-ID: In-Reply-To: On Sun, 1 May 2005, Daniel Barkalow wrote: > > I added a get_ref_sha1() that just does the .git/refs/ case; I think that > most things that want to accept various forms will also want to know what > form they got and do something with it, so get_sha1() isn't a big win. I really really disagree. For example, take something like "git-diff-cache". I think it's a big bonus if you can just write git-diff-cache HEAD and it will pick up the sha1 ID from .git/HEAD. In general, I think a "get_sha1()" that tries as many user-friendly things as possible is good for the command line. Within reason. I really don't like the "try to autocomplete a partial sha1" thing, but I wouldn't at all mind having various helpers like git-diff-tree HEAD.p1 HEAD where the ".p1" would just make it look up the first parent of the thing in HEAD (which in turn would mean "look up the sha1 from the .git/HEAD file". Many of these are really easy to do, and I think most people would tend to prefer having the choice. Linus