aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-05-07 09:21:40 +0200
committerJunio C Hamano <gitster@pobox.com>2025-05-07 10:50:14 -0700
commitec31474656de3849fb9ed31f238fabdb6a59f1b1 (patch)
treee198247fd2f38c3d404d164e58c4f48a1d6ad31b /Documentation
parentae76c1c99089903ce2b786a42a7e5598a7be5c5c (diff)
downloadgit-ec31474656de3849fb9ed31f238fabdb6a59f1b1.tar.xz
builtin/maintenance: introduce "worktree-prune" task
While git-gc(1) knows to prune stale worktrees, git-maintenance(1) does not yet have a task for this cleanup. Introduce a new "worktree-prune" task to plug this gap. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/maintenance.adoc8
-rw-r--r--Documentation/git-maintenance.adoc4
2 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/config/maintenance.adoc b/Documentation/config/maintenance.adoc
index 41536162a7..b36b62c1c4 100644
--- a/Documentation/config/maintenance.adoc
+++ b/Documentation/config/maintenance.adoc
@@ -83,3 +83,11 @@ maintenance.reflog-expire.auto::
positive value implies the command should run when the number of
expired reflog entries in the "HEAD" reflog is at least the value of
`maintenance.loose-objects.auto`. The default value is 100.
+
+maintenance.worktree-prune.auto::
+ This integer config option controls how often the `worktree-prune` task
+ should be run as part of `git maintenance run --auto`. If zero, then
+ the `worktree-prune` task will not run with the `--auto` option. A
+ negative value will force the task to run every time. Otherwise, a
+ positive value implies the command should run when the number of
+ prunable worktrees exceeds the value. The default value is 1.
diff --git a/Documentation/git-maintenance.adoc b/Documentation/git-maintenance.adoc
index 3a1e2a69b6..6f085a9cf8 100644
--- a/Documentation/git-maintenance.adoc
+++ b/Documentation/git-maintenance.adoc
@@ -166,6 +166,10 @@ reflog-expire::
The `reflog-expire` task deletes any entries in the reflog older than the
expiry threshold. See linkgit:git-reflog[1] for more information.
+worktree-prune::
+ The `worktree-prune` task deletes stale or broken worktrees. See
+ linkit:git-worktree[1] for more information.
+
OPTIONS
-------
--auto::