Re: [PATCH] Re: keeping remote repo checked out?
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Nov 29, 2005, 04:34 UTC
- Message-ID
- <Pine.LNX.4.64.0511282029290.3177@g5.osdl.org>
- In-Reply-To
- <Pine.LNX.4.64.0511282208050.25300@iabervon.org>
On Mon, 28 Nov 2005, Daniel Barkalow wrote:
> > I was planning to keep it in .git (instead of .git/refs/...), because it's > information about the working tree, not properly part of the repository. > It's like MERGE_HEAD in being about what the user is in the middle of.
That's fine.
However, your patch isn't.
Your patch just creates this eternal confusion of "why is HEAD different from CHECKED_OUT".
It's really easy to do what you want to do _without_ any tool changes:
git-rev-parse HEAD > .git/CHECKED_OUT rm .git/HEAD ln -s refs/heads/../../CHECKED_OUT .git/HEAD
and you're done. No tool changes necessary.
Now "HEAD" always points to the checked-out thing, but a "git clone" won't ever actually clone your CHECKED_OUT branch.
Linus