Unverified Commit 6e57010b by Edward Thomson Committed by GitHub

Merge pull request #5800 from mamapanda/check-sortedcache-lock

parents 935f8513 36232528
......@@ -254,7 +254,8 @@ static int loose_lookup_to_packfile(refdb_fs_backend *backend, const char *name)
if ((error = loose_parse_oid(&oid, name, &ref_file)) < 0)
goto done;
git_sortedcache_wlock(backend->refcache);
if ((error = git_sortedcache_wlock(backend->refcache)) < 0)
goto done;
if (!(error = git_sortedcache_upsert(
(void **)&ref, backend->refcache, name))) {
......@@ -760,7 +761,8 @@ static int reference_path_available(
}
}
git_sortedcache_rlock(backend->refcache);
if ((error = git_sortedcache_rlock(backend->refcache)) < 0)
return error;
for (i = 0; i < git_sortedcache_entrycount(backend->refcache); ++i) {
struct packref *ref = git_sortedcache_entry(backend->refcache, i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment