Commit 24ce105b by Vicent Martí

Merge pull request #441 from csware/ignore-missing-pack-file

ignore missing pack file
parents ef1e5da1 599297fd
...@@ -224,7 +224,10 @@ static int packfile_load__cb(void *_data, char *path) ...@@ -224,7 +224,10 @@ static int packfile_load__cb(void *_data, char *path)
} }
error = git_packfile_check(&pack, path); error = git_packfile_check(&pack, path);
if (error < GIT_SUCCESS) if (error == GIT_ENOTFOUND) {
/* ignore missing .pack file as git does */
return GIT_SUCCESS;
} else if (error < GIT_SUCCESS)
return git__rethrow(error, "Failed to load packfile"); return git__rethrow(error, "Failed to load packfile");
if (git_vector_insert(&backend->packs, pack) < GIT_SUCCESS) { if (git_vector_insert(&backend->packs, pack) < GIT_SUCCESS) {
......
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