Re: [RFC PATCH 0/1] worktree list: add --merged and --no-merged
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 21, 2026, 22:12 UTC
- Message-ID
- <xmqqbj8mln3c.fsf@gitster.g>
- In-Reply-To
- <CAHwyqnXC6--wTx0Mkj9r-9oj4R6ndubjzcucym8y3Hs9CKYfVw@mail.gmail.com>
Harald Nordgren <haraldnordgren@gmail.com> writes:
Show 6 quoted lines
> I wonder if we should relax (or allow relaxing) the requirements on > worktree branches overall? > > I noticed that I can't check out a branch that is checked out in > another worktree. Which seems a bit ridiculous because two regular > repos of the same upstream would never enforce that.
Because your repository updating what commit your 'main' points at would not affect my repository if they track the same upstream.
Worktrees are different. If you allow your two worktrees to check out the same 'main', and one of them makes a commit on top, you know what happens, right?
> AI loves worktress, so I suspect we'll see more of these discussions > in the future.
I think that was asked and answered already. "worktree add -d" is your friend.