Re: [PATCH] Detached HEAD (experimental)
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jan 10, 2007, 00:10 UTC
- Message-ID
- <7vd55nivx7.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0701091539050.3594@woody.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 14 quoted lines
> On Tue, 9 Jan 2007, Junio C Hamano wrote: >> >> Being able to test merge or even make commits without being on a >> branch is vastly useful. > > Yes. I think the detached head notion is really really important. I think > it was a mistake to not allow it initially, but hey, there were various > historical reasons, and the whole thing about how branches worked was a > bit up in the air. > > I would suggest a solution: > > - git checkout will refuse to switch AWAY from a detached head unless the > SHA1 of the detached head exactly matches some other branch.
... or an existing "ref^{commit}".Show 5 quoted lines
> I'd love to see the detached HEAD series move into "master", but I do > think we should make sure that people can't drop their work easily by > mistake, and I think the above suggestion is both simple and workable. > > Comments?
I agree with the "reachability is wrong -- you would lose the point in the middle" reasoning.