git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Chris WedgwoodNext: Chris Wedgwood
Message 6 of 15 in “cogito --- don't overwrite metadata files in place (breaks CoW use)”
  1. cogito --- don't overwrite metadata files in place (breaks CoW use)Chris Wedgwood, Jul 12, 2005
  2. Junio C HamanoJul 12, 2005
  3. Chris WedgwoodJul 13, 2005
  4. Matthias UrlichsJul 13, 2005
  5. Chris WedgwoodJul 13, 2005
  6. Linus TorvaldsJul 13, 2005
  7. Chris WedgwoodJul 13, 2005
  8. Linus TorvaldsJul 13, 2005
  9. Chris WedgwoodJul 13, 2005
  10. Linus TorvaldsJul 13, 2005
  11. Chris WedgwoodJul 13, 2005
  12. Matthias UrlichsJul 13, 2005
  13. Chris WedgwoodJul 13, 2005
  14. Linus TorvaldsJul 13, 2005
  15. Chris WedgwoodJul 13, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.