summaryrefslogtreecommitdiff
path: root/Documentation/git-maintenance.txt
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2020-09-17 18:11:47 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-09-17 11:30:05 -0700
commit090511bc0b73bf3054f11df6f275ad3a3abbf34f (patch)
tree66b06389aab543032b7c8b1ec0edaabec196336b /Documentation/git-maintenance.txt
parentmaintenance: add commit-graph task (diff)
downloadtgif-090511bc0b73bf3054f11df6f275ad3a3abbf34f.tar.xz
maintenance: add --task option
A user may want to only run certain maintenance tasks in a certain order. Add the --task=<task> option, which allows a user to specify an ordered list of tasks to run. These cannot be run multiple times, however. Here is where our array of maintenance_task pointers becomes critical. We can sort the array of pointers based on the task order, but we do not want to move the struct data itself in order to preserve the hashmap references. We use the hashmap to match the --task=<task> arguments into the task struct data. Keep in mind that the 'enabled' member of the maintenance_task struct is a placeholder for a future 'maintenance.<task>.enabled' config option. Thus, we use the 'enabled' member to specify which tasks are run when the user does not specify any --task=<task> arguments. The 'enabled' member should be ignored if --task=<task> appears. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-maintenance.txt')
-rw-r--r--Documentation/git-maintenance.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-maintenance.txt b/Documentation/git-maintenance.txt
index fc5dbcf0b9..819ca41ab6 100644
--- a/Documentation/git-maintenance.txt
+++ b/Documentation/git-maintenance.txt
@@ -30,7 +30,9 @@ SUBCOMMANDS
-----------
run::
- Run one or more maintenance tasks.
+ Run one or more maintenance tasks. If one or more `--task=<task>`
+ options are specified, then those tasks are run in the provided
+ order. Otherwise, only the `gc` task is run.
TASKS
-----
@@ -63,6 +65,11 @@ OPTIONS
--quiet::
Do not report progress or other information over `stderr`.
+--task=<task>::
+ If this option is specified one or more times, then only run the
+ specified tasks in the specified order. See the 'TASKS' section
+ for the list of accepted `<task>` values.
+
GIT
---
Part of the linkgit:git[1] suite