Subject: Re: [PATCH v2 1/2] worktree: clarify --expire applies to missing worktrees

From: Junio C Hamano <[email-masked]>
Date: Sat, 20 Dec 2025 15:07:24 +0900

"Sam Bostock via GitGitGadget" <[email-masked]> writes:

> From: Sam Bostock <[email-masked]>
>
> 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.

Well analyzed and described.

> This updates the help text and documentation to consistently describe
> these as "missing worktrees".

We phrase it more like "Update the help text and documentation to
...", as if you are asking somebody sitting on the keyboard to make
that change.

> diff --git a/builtin/worktree.c b/builtin/worktree.c
> index fbdaf2eb2e..82fcbfeccf 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 <time>")),
> +				N_("expire missing working trees older than <time>")),

"expire" -> "prune" or "remove".  As the user already said "prune"
when they run "git worktree prune -h", using a different and more
common verb "remove" to explain the action might be more helpful
than saying "prune".

Thanks.