From 6f5ca70580444e61231ad33de0aac81d2420d523 Mon Sep 17 00:00:00 2001 From: Sam Bostock Date: Wed, 28 Jan 2026 05:39:45 +0000 Subject: worktree: clarify that --expire only affects missing worktrees The --expire option for "git worktree list" and "git worktree prune" only affects worktrees whose working directory path no longer exists. The help text did not make this clear, and the documentation inconsistently used "unused" for prune but "missing" for list. Update the help text and documentation to consistently describe these as "missing worktrees", and use "prune" instead of "expire" when describing the effect on missing worktrees since the terminology is clearer. While at it, expand the description of the "prune" subcommand itself to better explain what it does and when to use it, as suggested by Junio. Helped-by: Eric Sunshine Helped-by: Junio C Hamano Signed-off-by: Sam Bostock Signed-off-by: Junio C Hamano --- builtin/worktree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin/worktree.c') diff --git a/builtin/worktree.c b/builtin/worktree.c index 812774a5ca..2b84028fea 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -252,7 +252,7 @@ static int prune(int ac, const char **av, const char *prefix, OPT__DRY_RUN(&show_only, N_("do not remove, show only")), OPT__VERBOSE(&verbose, N_("report pruned working trees")), OPT_EXPIRY_DATE(0, "expire", &expire, - N_("expire working trees older than