diff --git a/run-command.c b/run-command.c index e3e02475cc..438a290d30 100644 --- a/run-command.c +++ b/run-command.c @@ -1828,7 +1828,7 @@ int prepare_auto_maintenance(int quiet, struct child_process *maint) */ if (repo_config_get_bool(the_repository, "maintenance.autodetach", &auto_detach) && repo_config_get_bool(the_repository, "gc.autodetach", &auto_detach)) - auto_detach = 1; + auto_detach = git_env_bool("GIT_TEST_MAINT_AUTO_DETACH", true); maint->git_cmd = 1; maint->close_object_store = 1; diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh index 1e354e057f..d62760eb92 100755 --- a/t/t5616-partial-clone.sh +++ b/t/t5616-partial-clone.sh @@ -229,7 +229,7 @@ test_expect_success 'fetch --refetch triggers repacking' ' GIT_TRACE2_EVENT="$PWD/trace1.event" \ git -C pc1 fetch --refetch origin && - test_subcommand git maintenance run --auto --no-quiet --detach