git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Sam Bostock via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Eric Sunshine <sunshine@sunshineco.com>,
	 Sam Bostock <sam.bostock@shopify.com>
Subject: Re: [PATCH v2 1/2] worktree: clarify --expire applies to missing worktrees
Date: Sat, 20 Dec 2025 15:07:24 +0900	[thread overview]
Message-ID: <xmqqqzspu1nn.fsf@gitster.g> (raw)
In-Reply-To: <ddd4191ecb391e10bf4b123f699384a3d609b4a8.1766168169.git.gitgitgadget@gmail.com> (Sam Bostock via GitGitGadget's message of "Fri, 19 Dec 2025 18:16:08 +0000")

"Sam Bostock via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Sam Bostock <sam.bostock@shopify.com>
>
> 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.

  reply	other threads:[~2025-12-20  6:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 15:00 [PATCH] worktree: clarify --expire applies to missing worktrees Sam Bostock via GitGitGadget
2025-12-19 15:11 ` Eric Sunshine
2025-12-20  5:44   ` Junio C Hamano
2025-12-20  7:14     ` Eric Sunshine
2025-12-20  7:31       ` Junio C Hamano
2025-12-20  8:23         ` Eric Sunshine
2025-12-19 18:16 ` [PATCH v2 0/2] " Sam Bostock via GitGitGadget
2025-12-19 18:16   ` [PATCH v2 1/2] " Sam Bostock via GitGitGadget
2025-12-20  6:07     ` Junio C Hamano [this message]
2025-12-19 18:16   ` [PATCH v2 2/2] worktree: use 'prune' instead of 'expire' in help text Sam Bostock via GitGitGadget
2025-12-20  6:11     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqqzspu1nn.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=sam.bostock@shopify.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).