Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-03 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Dec 3, 2014 at 12:30 AM, Junio C Hamano wrote: >>> I do like "read-only" ref concept where we can keep ref name >>> (especially tags) in HEAD until the next commit. But it didn't go >>> anywhere >> >> Remind me. That sounds somewhat interesting. > > Couldn't find an

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-03 Thread Duy Nguyen
On Wed, Dec 3, 2014 at 12:30 AM, Junio C Hamano wrote: >> I do like "read-only" ref concept where we can keep ref name >> (especially tags) in HEAD until the next commit. But it didn't go >> anywhere > > Remind me. That sounds somewhat interesting. Couldn't find anything in my mail archive. But

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-03 Thread Mark Levedahl
On 12/02/2014 12:30 PM, Junio C Hamano wrote: Duy Nguyen writes: FWIW git-branch usually can show the original branch of detached head (must not always). I don't think we have a plumbing equivalent for it though. People can "tail -1 $GIT_DIR/logs/HEAD| sed .." but that seems hacky. @{-1}, i.e

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-02 Thread Junio C Hamano
Duy Nguyen writes: > FWIW git-branch usually can show the original branch of detached head > (must not always). I don't think we have a plumbing equivalent for it > though. People can "tail -1 $GIT_DIR/logs/HEAD| sed .." but that seems > hacky. @{-1}, i.e. "the last branch I checked out"? > I d

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 12:04 PM, Mark Levedahl wrote: > 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

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 12:39 AM, Junio C Hamano wrote: > Sorry, what is a hic? Off topic. It's the sound (in Vietnamese) when you inhale through your nose, e.g. like when you cry.. I know there's an equivalent in English, just can't remember it now. -- Duy -- To unsubscribe from this list: send

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-01 Thread Mark Levedahl
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 r

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-01 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Nov 30, 2014 at 12:18:40PM -0500, Mark Levedahl wrote: >> On 11/30/2014 03:24 AM, Nguyễn Thái Ngọc Duy wrote: >> > 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-bran

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-01 Thread Duy Nguyen
On Sun, Nov 30, 2014 at 12:18:40PM -0500, Mark Levedahl wrote: > On 11/30/2014 03:24 AM, Nguyễn Thái Ngọc Duy wrote: > > 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 ot

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-11-30 Thread Mark Levedahl
On 11/30/2014 03:24 AM, Nguyễn Thái Ngọc Duy wrote: 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