From: Mark Levedahl Date: Tue, 02 Dec 2014 05:04:59 GMT Subject: Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere Message-ID: <547D487B.4040502@gmail.com> In-Reply-To: On 12/01/2014 12:39 PM, Junio C Hamano wrote: > Sorry, what is a hic? If this were an existing feature like > git-new-workdir, even though it is from contrib, making it impossible > to do something that used to be possible, even if that something is > what mere mortals would never want to to to avoid risking confusion, > would be a regression that needs an escape hatch. But this is a new > feature. I am not sure why you need to make this overridable in the > first place. Those who want to have multiple checkouts of the same > commit can just detach HEAD at the same commit in multiple working > trees, as the first thing they need to do would be to run "git reset > --hard $branch" to synchronize the HEAD and the working tree state to > work in the other out-of-sync repositories either case anyway. Yes, detached HEADS allow multiple checkouts, but now the user needs another system to record what $branch was for each checked out tree or needs to resort to forensics using various git-branch / git-log invocations to find the most-likely value. So, I do not find detached HEADS useful in general, and specifically not for this case. Duy's latest addition ('--ignore-other-worktrees') would, so far as I see, allow this feature to replace git-new-workdir in my uses, but without the addition it cannot. Mark