Subject: Re: [PATCH 0/3] worktree: add -d shorthand for --detach & improve documentation

From: Junio C Hamano <[email-masked]>
Date: Sun, 06 Sep 2020 14:58:25 -0700

Eric Sunshine <[email-masked]> writes:

> This series grew directly out of suggestions proposed in [1]. Its
> purpose is twofold. First, it brings git-worktree in line with the other
> "checkout a branch" commands git-switch and git-checkout by teaching it
> -d as shorthand for --detach (which those other commands already
> understand).

Hmph, "checkout" would not affect list of worktrees, but "worktree"
could be used to delete an worktree, so I (or any other naive user
like me) may mistake "-d" to mean "delete a worktree".

But it is not "teach 'worktree' that -d is shorthand for --detach";
it is "teach 'worktree add' that -d is for --detach".  And in that
context, when adding a new worktree, there is no room for such a
confusion to come into the picture.

So I think it is just the way the series is marketted that triggered
a potential negative reaction from me.

>   worktree: add -d short option for --detach