summaryrefslogtreecommitdiff
path: root/refspec.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-02-19 00:05:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-01 02:57:39 (GMT)
commitb8d45d035536b5635929d281f1b4aae004d8891b (patch)
tree0f16d0583c7d70198bf9e2135d4d0e799e8f87f1 /refspec.c
parentbbf05cf70e5d0ba113ea4ed4c7c77cb890707911 (diff)
downloadgit-b8d45d035536b5635929d281f1b4aae004d8891b.zip
git-b8d45d035536b5635929d281f1b4aae004d8891b.tar.gz
git-b8d45d035536b5635929d281f1b4aae004d8891b.tar.bz2
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>
Diffstat (limited to 'refspec.c')
-rw-r--r--refspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refspec.c b/refspec.c
index f529092..9a9bf21 100644
--- a/refspec.c
+++ b/refspec.c
@@ -72,7 +72,7 @@ static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
/* LHS */
if (!*item->src)
; /* 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 */
else if (!check_refname_format(item->src, flags))
; /* valid looking ref is ok */