From 3fbf580c91935ccdea25a135204419991f503b63 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 23 Jan 2022 09:47:01 -0500 Subject: oid: give oids a type `git_oid`s now have a type, and we require the oid type when creating the object id from creation functions. --- src/libgit2/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libgit2/fetch.c') diff --git a/src/libgit2/fetch.c b/src/libgit2/fetch.c index e9f30d9bc..c27857078 100644 --- a/src/libgit2/fetch.c +++ b/src/libgit2/fetch.c @@ -75,7 +75,7 @@ static int maybe_want_oid(git_remote *remote, git_refspec *spec) oid_head = git__calloc(1, sizeof(git_remote_head)); GIT_ERROR_CHECK_ALLOC(oid_head); - git_oid_fromstr(&oid_head->oid, spec->src); + git_oid_fromstr(&oid_head->oid, spec->src, GIT_OID_SHA1); if (spec->dst) { oid_head->name = git__strdup(spec->dst); @@ -140,7 +140,7 @@ static int filter_wants(git_remote *remote, const git_fetch_options *opts) /* Handle explicitly specified OID specs */ git_vector_foreach(&remote->active_refspecs, i, spec) { - if (!git_oid__is_hexstr(spec->src)) + if (!git_oid__is_hexstr(spec->src, GIT_OID_SHA1)) continue; if (!(remote_caps & oid_mask)) { -- cgit v1.2.1