vendor/libgit2/src/odb_pack.c in rugged-0.24.0 vs vendor/libgit2/src/odb_pack.c in rugged-0.24.5
- old
+ new
@@ -262,11 +262,12 @@
return 0;
if (!pack_entry_find_inner(e, backend, oid, last_found))
return 0;
- return git_odb__error_notfound("failed to find pack entry", oid);
+ return git_odb__error_notfound(
+ "failed to find pack entry", oid, GIT_OID_HEXSZ);
}
static int pack_entry_find_prefix(
struct git_pack_entry *e,
struct pack_backend *backend,
@@ -307,11 +308,12 @@
backend->last_found = p;
}
}
if (!found)
- return git_odb__error_notfound("no matching pack entry for prefix", short_oid);
+ return git_odb__error_notfound("no matching pack entry for prefix",
+ short_oid, len);
else
return 0;
}
@@ -331,11 +333,11 @@
if (backend->pack_folder == NULL)
return 0;
if (p_stat(backend->pack_folder, &st) < 0 || !S_ISDIR(st.st_mode))
- return git_odb__error_notfound("failed to refresh packfiles", NULL);
+ return git_odb__error_notfound("failed to refresh packfiles", NULL, 0);
git_buf_sets(&path, backend->pack_folder);
/* reload all packs */
error = git_path_direach(&path, 0, packfile_load__cb, backend);
@@ -586,12 +588,9 @@
int git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir)
{
int error = 0;
struct pack_backend *backend = NULL;
git_buf path = GIT_BUF_INIT;
-
- if (git_mwindow_files_init() < 0)
- return -1;
if (pack_backend__alloc(&backend, 8) < 0)
return -1;
if (!(error = git_buf_joinpath(&path, objects_dir, "pack")) &&