refspec: make hash size independent
Switch a use of GIT_SHA1_HEXSZ to use the_hash_algo. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
bbf05cf70e
commit
b8d45d0355
|
@ -72,7 +72,7 @@ static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
|
||||||
/* LHS */
|
/* LHS */
|
||||||
if (!*item->src)
|
if (!*item->src)
|
||||||
; /* empty is ok; it means "HEAD" */
|
; /* empty is ok; it means "HEAD" */
|
||||||
else if (llen == GIT_SHA1_HEXSZ && !get_oid_hex(item->src, &unused))
|
else if (llen == the_hash_algo->hexsz && !get_oid_hex(item->src, &unused))
|
||||||
item->exact_sha1 = 1; /* ok */
|
item->exact_sha1 = 1; /* ok */
|
||||||
else if (!check_refname_format(item->src, flags))
|
else if (!check_refname_format(item->src, flags))
|
||||||
; /* valid looking ref is ok */
|
; /* valid looking ref is ok */
|
||||||
|
|
Loading…
Reference in New Issue