summaryrefslogtreecommitdiff
path: root/Documentation/fetch-options.txt
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-09-17 18:11:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-17 18:30:05 (GMT)
commita95ce124305adcc4980241b8877e06db1d6ed411 (patch)
treedaf8ff6ae6cf3e4674e101b219ca9da41f6a7b43 /Documentation/fetch-options.txt
parent3ddaad0e06035a752c9010dcd5094b37262080fb (diff)
downloadgit-a95ce124305adcc4980241b8877e06db1d6ed411.zip
git-a95ce124305adcc4980241b8877e06db1d6ed411.tar.gz
git-a95ce124305adcc4980241b8877e06db1d6ed411.tar.bz2
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 'Documentation/fetch-options.txt')
-rw-r--r--Documentation/fetch-options.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 07d06ff..b65a758 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -95,9 +95,11 @@ ifndef::git-pull[]
Allow several <repository> and <group> arguments to be
specified. No <refspec>s may be specified.
+--[no-]auto-maintenance::
--[no-]auto-gc::
- Run `git gc --auto` at the end to perform garbage collection
- if needed. This is enabled by default.
+ Run `git maintenance run --auto` at the end to perform automatic
+ repository maintenance if needed. (`--[no-]auto-gc` is a synonym.)
+ This is enabled by default.
--[no-]write-commit-graph::
Write a commit-graph after fetching. This overrides the config