diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2020-09-17 18:11:44 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-17 11:30:05 -0700 |
commit | a95ce124305adcc4980241b8877e06db1d6ed411 (patch) | |
tree | daf8ff6ae6cf3e4674e101b219ca9da41f6a7b43 /t | |
parent | maintenance: add --quiet option (diff) | |
download | tgif-a95ce124305adcc4980241b8877e06db1d6ed411.tar.xz |
maintenance: replace run_auto_gc()
The run_auto_gc() method is used in several places to trigger a check
for repo maintenance after some Git commands, such as 'git commit' or
'git fetch'.
To allow for extra customization of this maintenance activity, replace
the 'git gc --auto [--quiet]' call with one to 'git maintenance run
--auto [--quiet]'. As we extend the maintenance builtin with other
steps, users will be able to select different maintenance activities.
Rename run_auto_gc() to run_auto_maintenance() to be clearer what is
happening on this call, and to expose all callers in the current diff.
Rewrite the method to use a struct child_process to simplify the calls
slightly.
Since 'git fetch' already allows disabling the 'git gc --auto'
subprocess, add an equivalent option with a different name to be more
descriptive of the new behavior: '--[no-]maintenance'. Update the
documentation to include these options at the same time.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5510-fetch.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 2a1abe91f0..a9682c5669 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -934,7 +934,7 @@ test_expect_success 'fetching with auto-gc does not lock up' ' git config fetch.unpackLimit 1 && git config gc.autoPackLimit 1 && git config gc.autoDetach false && - GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 && + GIT_ASK_YESNO="$D/askyesno" git fetch --verbose >fetch.out 2>&1 && test_i18ngrep "Auto packing the repository" fetch.out && ! grep "Should I try again" fetch.out ) |