Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 13, 2005, 20:05 UTC
- Message-ID
- <Pine.LNX.4.58.0507131256490.17536@g5.osdl.org>
- In-Reply-To
- <20050713185339.GA9260@taniwha.stupidest.org>
On Wed, 13 Jul 2005, Chris Wedgwood wrote:
Show 8 quoted lines
> On Wed, Jul 13, 2005 at 09:03:26AM +0200, Matthias Urlichs wrote: > > > You are ;-) the tree itsels is no symlinked, but HEAD points to > > refs/heads/<branch> by default. > > Thanks for pointing that out. I honestly never noticed that. > > How about the following?
This is really complicated, for no good reason.
The _object_ directories should be linked, but it's really wrong to link the "refs/" directories and expect them to have COW behaviour.
I've tried to make most of the git tools write the refs objects "safely" too, ie things like "git-receive-pack" (the receiving end of a "git-send-pack") will write the new ref to a lock-file and then do a "rename()" to set it. That is COW-safe, but the thing is, it's incredibly painful for many other operations, and I won't guarantee that git in general is always going to be COW-safe wrt all the git files.
For example, the "git clone -l" behaviour will _only_ link the objects subdirectory. The rest is copied. Unless there's a bug there somewhere.
Linus