Re: [PATCH] Detached HEAD (experimental)
- From
Jeff King <peff@peff.net>
- Date
- Jan 3, 2007, 11:59 UTC
- Message-ID
- <20070103115924.GA11136@coredump.intra.peff.net>
- In-Reply-To
- <20070103104620.GA27015@coredump.intra.peff.net>
On Wed, Jan 03, 2007 at 05:46:20AM -0500, Jeff King wrote:
> Also, the implementation should be conceptually simple. Put > refs/tags/v1.4.0 into HEAD on checkout. Disallow commit/merge unless > HEAD points to refs/heads/*.
Let me take that back. It is actually still annoying to implement, since many things (at least commit-tree, branch) are unhappy with a non-branch in HEAD. Moreover, it's not as flexible as simply putting the commit sha1 into the HEAD, as you suggested. My suggestion allows only non-branch refs to be checked-out; however, it's likely somebody might want to git-checkout HEAD~10 or some other unnamed thing.
-Peff