Re: keeping remote repo checked out?

From: Daniel Barkalow <barkalow@iabervon.org>
Date: 2005-11-29 13:35:39
On Mon, 28 Nov 2005, Linus Torvalds wrote:

> On Mon, 28 Nov 2005, Daniel Barkalow wrote:
> > 
> > We really ought to keep track of what the current checked out tree is, 
> > independant of the head that it's supposed to match. Then it would be safe 
> > to push to a head that's checked out (it wouldn't update it, but the 
> > system would understand what's going on).
> 
> Well, that's what branches are all about. 
> 
> You really have two choices:
>  - do it all yourself
>  - use git branches
> 
> but if you use a special git branch for the checked-out state, then you 
> have to realize that nobody can push directly to it.

The idea is to have something which is private, to match the working tree, 
which is obviously private (because it doesn't even exist from the point 
of view of the database). Of course, you don't want most of the branch 
mechanism, with HEAD pointing to a file, because when you commit, you want 
to update something else, and when you check out, you want to check out 
something else. You want to use a normal git branch, but still have git 
keep track of what it thinks should be in your working tree, regardless of 
what the branch you're on does, so that checkout doesn't get confused if 
somebody's pushed to the branch you're on.

Then, if someone pushes to a branch that's checked out, git doesn't lose 
track of what it put in the working tree, so it can handle the "git 
checkout" that you do afterwards to update the working tree. Making 
everything work okay if multiple "git checkout"s happen at the same time 
is future work, and will definitely involve locking.

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Nov 29 13:36:02 2005

This archive was generated by hypermail 2.1.8 : 2005-11-29 13:36:11 EST