Commit 891a4681 by Vicent Marti

dat errorcode

parent 4a863c06
...@@ -608,7 +608,7 @@ int git_odb__read_header_or_object( ...@@ -608,7 +608,7 @@ int git_odb__read_header_or_object(
int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id) int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id)
{ {
unsigned int i; unsigned int i;
int error = GIT_ENOTFOUND; int error;
bool refreshed = false; bool refreshed = false;
git_rawobj raw; git_rawobj raw;
...@@ -624,6 +624,7 @@ int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id) ...@@ -624,6 +624,7 @@ int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id)
return 0; return 0;
attempt_lookup: attempt_lookup:
error = GIT_ENOTFOUND;
for (i = 0; i < db->backends.length && error < 0; ++i) { for (i = 0; i < db->backends.length && error < 0; ++i) {
backend_internal *internal = git_vector_get(&db->backends, i); backend_internal *internal = git_vector_get(&db->backends, i);
......
...@@ -600,7 +600,12 @@ int git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir) ...@@ -600,7 +600,12 @@ int git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir)
} }
if (git_path_isdir(git_buf_cstr(&path)) == true) { if (git_path_isdir(git_buf_cstr(&path)) == true) {
int error;
backend->pack_folder = git_buf_detach(&path); backend->pack_folder = git_buf_detach(&path);
error = pack_backend__refresh((git_odb_backend *)backend);
if (error < 0)
return error;
} }
backend->parent.read = &pack_backend__read; backend->parent.read = &pack_backend__read;
......
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