Skip to content

Commit b8d45d0

Browse files
bk2204gitster
authored andcommitted
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>
1 parent bbf05cf commit b8d45d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refspec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
7272
/* LHS */
7373
if (!*item->src)
7474
; /* empty is ok; it means "HEAD" */
75-
else if (llen == GIT_SHA1_HEXSZ && !get_oid_hex(item->src, &unused))
75+
else if (llen == the_hash_algo->hexsz && !get_oid_hex(item->src, &unused))
7676
item->exact_sha1 = 1; /* ok */
7777
else if (!check_refname_format(item->src, flags))
7878
; /* valid looking ref is ok */

0 commit comments

Comments
 (0)