}
- ret = write_midx_file(source, opts.preferred_pack,
+ ret = write_midx_file(source->packed, opts.preferred_pack,
- opts.refs_snapshot, opts.flags);
+ opts.refs_snapshot, opts.incremental_base,
+ opts.flags);
free(opts.refs_snapshot);
return ret;
update_server_info(repo, 0);
if (git_env_bool(GIT_TEST_MULTI_PACK_INDEX, 0)) {
+ struct odb_source_files *files = odb_source_files_downcast(existing.source);
unsigned flags = 0;
+
if (git_env_bool(GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL, 0))
flags |= MIDX_WRITE_INCREMENTAL;
- write_midx_file(files->packed, NULL, NULL, flags);
- write_midx_file(existing.source, NULL, NULL, NULL, flags);
++ write_midx_file(files->packed, NULL, NULL, NULL, flags);
}
cleanup:
return result;
}
-int write_midx_file(struct odb_source *source,
+int write_midx_file(struct odb_source_packed *source,
const char *preferred_pack_name,
const char *refs_snapshot,
+ const char *incremental_base,
unsigned flags)
{
struct write_midx_opts opts = {
* Variant of write_midx_file which writes a MIDX containing only the packs
* specified in packs_to_include.
*/
-int write_midx_file(struct odb_source *source,
+int write_midx_file(struct odb_source_packed *source,
const char *preferred_pack_name, const char *refs_snapshot,
- unsigned flags);
+ const char *incremental_base, unsigned flags);
-int write_midx_file_only(struct odb_source *source,
+int write_midx_file_only(struct odb_source_packed *source,
struct string_list *packs_to_include,
const char *preferred_pack_name,
const char *refs_snapshot,