Re: [PATCH 0/3] worktree: add -d shorthand for --detach & improve documentation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 6, 2020, 21:58 UTC
- Message-ID
- <xmqqlfhm36v2.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200904070703.47898-1-sunshine@sunshineco.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 5 quoted lines
> 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