Re: Complete http-pull; where should it go?
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- May 1, 2005, 21:25 UTC
- Message-ID
- <Pine.LNX.4.21.0505011656270.30848-100000@iabervon.org>
- In-Reply-To
- <Pine.LNX.4.58.0505011337070.2296@ppc970.osdl.org>
On Sun, 1 May 2005, Linus Torvalds wrote:
Show 12 quoted lines
> On Sun, 1 May 2005, Daniel Barkalow wrote: > > > > Right; what I want to make programs able to do is take explicit > > references, instead of only taking the objects they reference. So you > > say heads/master or heads/linus instead of > > "198b0fb635ed8a007bac0c16eab112c5e2c7995c". > > That's fine. > > This is really just an issue of havign a function that does "get_sha1()", > and then making the things that take command line arguments use that > one instead of "get_sha1_hex()".
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.
The biggest thing so far is actually writing the references when the user has specified where to write them, and I wanted to restrict that to a target of the right format.
Show 5 quoted lines
> The _only_ thing I want to be careful about is that all the _internal_ > stuff still have to use the strict "get_sha1_hex()" function, ie we should > never _ever_ accept a tree object where the "sha1" ends up being anything > but the hex thing. So this "generalized get_sha1()" would have to be used > only on real user input (ie argv[] array and the like).
Agreed.
-Daniel *This .sig left intentionally blank*