diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-06 09:30:20 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-10 11:02:12 +0100 |
commit | 440b1995ab45ae205dd63366a374f2c491bd16a9 (patch) | |
tree | 2ce55b8d16a9921c1dfd739a29005d25f4aa9117 /src/libgit2/fetch.c | |
parent | d16731e445eda35192f9c338d750a773d343d59a (diff) | |
download | libgit2-440b1995ab45ae205dd63366a374f2c491bd16a9.tar.gz |
fetch: support SHA256 refs
Diffstat (limited to 'src/libgit2/fetch.c')
-rw-r--r-- | src/libgit2/fetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libgit2/fetch.c b/src/libgit2/fetch.c index 003b5198a..ff10bde02 100644 --- a/src/libgit2/fetch.c +++ b/src/libgit2/fetch.c @@ -76,7 +76,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_SHA1); + git_oid__fromstr(&oid_head->oid, spec->src, remote->repo->oid_type); if (spec->dst) { oid_head->name = git__strdup(spec->dst); @@ -137,7 +137,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, GIT_OID_SHA1)) + if (!git_oid__is_hexstr(spec->src, remote->repo->oid_type)) continue; if (!(remote_caps & oid_mask)) { |