From: Junio C Hamano Date: Tue, 02 Dec 2014 17:30:22 GMT Subject: Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere Message-ID: In-Reply-To: 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 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.