Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere
- From
Mark Levedahl <mlevedahl@gmail.com>
- Date
- Nov 30, 2014, 17:18 UTC
- Message-ID
- <547B5170.6050206@gmail.com>
- In-Reply-To
- <1417335899-27307-25-git-send-email-pclouds@gmail.com>
On 11/30/2014 03:24 AM, Nguyễn Thái Ngọc Duy wrote:
Show 5 quoted lines
> One branch obviously can't be checked out at two places (but detached > heads are ok). Give the user a choice in this case: --detach, -b > new-branch, switch branch in the other checkout first or simply 'cd' > and continue to work there. >
This seems too restrictive and is not "obvious" to me: I currently use git-new-workdir to have multiple checkouts of the same branch, with no ill effect. While those who do not understand what is going on underneath might be confused by one checkout suddenly showing uncommitted diffs, I don't accept that as a reason to outright prevent such use. I suggest, at the very least, that this behavior be overridden by a --force flag?
Mark