struct child_process repack_cmd = CHILD_PROCESS_INIT;
repack_cmd.git_cmd = 1;
- repack_cmd.close_object_store = 1;
+ repack_cmd.odb_to_close = the_repository->objects;
strvec_pushv(&repack_cmd.args, repack_args.v);
if (run_command(&repack_cmd))
die(FAILED_RUN, repack_args.v[0]);
{
struct child_process child = CHILD_PROCESS_INIT;
- child.git_cmd = child.close_object_store = 1;
+ child.git_cmd = 1;
+ child.odb_to_close = the_repository->objects;
strvec_pushl(&child.args, "commit-graph", "write",
"--split", "--reachable", NULL);
{
struct child_process child = CHILD_PROCESS_INIT;
- child.git_cmd = child.close_object_store = 1;
+ child.git_cmd = 1;
+ child.odb_to_close = the_repository->objects;
strvec_push(&child.args, "gc");
if (opts->auto_flag)
{
struct child_process child = CHILD_PROCESS_INIT;
- child.git_cmd = child.close_object_store = 1;
+ child.git_cmd = 1;
+ child.odb_to_close = the_repository->objects;
strvec_pushl(&child.args, "multi-pack-index", "expire", NULL);
if (opts->quiet)
{
struct child_process child = CHILD_PROCESS_INIT;
- child.git_cmd = child.close_object_store = 1;
+ child.git_cmd = 1;
+ child.odb_to_close = the_repository->objects;
strvec_pushl(&child.args, "multi-pack-index", "repack", NULL);
if (opts->quiet)
fflush(NULL);
- if (cmd->close_object_store)
- odb_close(the_repository->objects);
+ if (cmd->odb_to_close)
+ odb_close(cmd->odb_to_close);
#ifndef GIT_WINDOWS_NATIVE
{
auto_detach = git_env_bool("GIT_TEST_MAINT_AUTO_DETACH", true);
maint->git_cmd = 1;
- maint->close_object_store = 1;
+ maint->odb_to_close = the_repository->objects;
strvec_pushl(&maint->args, "maintenance", "run", "--auto", NULL);
strvec_push(&maint->args, quiet ? "--quiet" : "--no-quiet");
strvec_push(&maint->args, auto_detach ? "--detach" : "--no-detach");
* want to repack because that would delete `.pack` files (and on
* Windows, you cannot delete files that are still in use).
*/
- unsigned close_object_store:1;
+ struct object_database *odb_to_close;
unsigned stdout_to_stderr:1;
unsigned clean_on_exit:1;