]> git.ipfire.org Git - thirdparty/git.git/commit
worktree: clarify that --expire only affects missing worktrees
authorSam Bostock <sam.bostock@shopify.com>
Wed, 28 Jan 2026 05:39:45 +0000 (05:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Jan 2026 23:25:33 +0000 (15:25 -0800)
commit6f5ca70580444e61231ad33de0aac81d2420d523
tree78c02ee2da7e41445388f678270a2cb0a191f17e
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
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 <sunshine@sunshineco.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Sam Bostock <sam@sambostock.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.adoc
builtin/worktree.c