Commit 45c4697c by Vicent Martí

Merge pull request #928 from barrbrain/odb-pack-stat-less

odb_pack: try lookup before refreshing packs
parents 13faa77c ab8a0402
......@@ -268,13 +268,13 @@ static int pack_entry_find(struct git_pack_entry *e, struct pack_backend *backen
int error;
unsigned int i;
if ((error = packfile_refresh_all(backend)) < 0)
return error;
if (backend->last_found &&
git_pack_entry_find(e, backend->last_found, oid, GIT_OID_HEXSZ) == 0)
return 0;
if ((error = packfile_refresh_all(backend)) < 0)
return error;
for (i = 0; i < backend->packs.length; ++i) {
struct git_pack_file *p;
......
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