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

From: Junio C Hamano <[email-masked]>
Date: Tue, 02 Dec 2014 09:30:22 -0800

Duy Nguyen <[email-masked]> 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.