]> git.ipfire.org Git - thirdparty/git.git/commit - sha1-name.c
Update get_sha1() to grok extended format.
authorJunio C Hamano <junkio@cox.net>
Thu, 4 Aug 2005 05:15:49 +0000 (22:15 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 5 Aug 2005 07:51:07 +0000 (00:51 -0700)
commit9938af6a85dd08436ad373fc07a1ddba8dcfa170
tree476d9177c8b5023e1804dcf9354efc1966bcdea1
parent37fde874c2448ae2cd98abe24df2bd2a50aa2cda
Update get_sha1() to grok extended format.

Everybody envies rev-parse, who is the only one that can grok
the extended sha1 format.  Move the get_extended_sha1() out of
rev-parse, rename it to get_sha1() and make it available to
everybody else.

The one I posted earlier to the list had one bug where it did
not handle a name that ends with a digit correctly (it
incorrectly tried the "Nth parent" path).  This commit fixes it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile
rev-parse.c
sha1_file.c
sha1_name.c [new file with mode: 0644]