mirror of
https://git.proxmox.com/git/libgit2
synced 2025-10-15 11:04:49 +00:00
Merge pull request #928 from barrbrain/odb-pack-stat-less
odb_pack: try lookup before refreshing packs
This commit is contained in:
commit
45c4697c48
@ -268,13 +268,13 @@ static int pack_entry_find(struct git_pack_entry *e, struct pack_backend *backen
|
|||||||
int error;
|
int error;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if ((error = packfile_refresh_all(backend)) < 0)
|
|
||||||
return error;
|
|
||||||
|
|
||||||
if (backend->last_found &&
|
if (backend->last_found &&
|
||||||
git_pack_entry_find(e, backend->last_found, oid, GIT_OID_HEXSZ) == 0)
|
git_pack_entry_find(e, backend->last_found, oid, GIT_OID_HEXSZ) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if ((error = packfile_refresh_all(backend)) < 0)
|
||||||
|
return error;
|
||||||
|
|
||||||
for (i = 0; i < backend->packs.length; ++i) {
|
for (i = 0; i < backend->packs.length; ++i) {
|
||||||
struct git_pack_file *p;
|
struct git_pack_file *p;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user