Thread (9 messages) flat view 9 messages, 2 authors, 2020-09-07

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

From: Junio C Hamano <hidden>
Date: 2020-09-06 21:58:31

Eric Sunshine [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help