On Wed, 13 Jul 2005, Chris Wedgwood wrote:
> The complexity I added was to deal with a situation where we have
>   tree1/
>       .git/HEAD -> refs/head/master
> and I do "cp -Rl tree1 tree2" giving me:
>   tree2/
>       .git/HEAD -> refs/head/master
>   and .git/refs/head/master is hardlinked between both trees.


You shouldn't hardlink whole trees. Git will not guarantee that it breaks 
the links.

Right now, if you go a "git commit", and a number of other core git 
operations, it will use ">" to overwrite the HEAD. You're screwed.

> > 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.
> What operations is this painful for?

Your script was tens of lines of code, and it was BUGGY.

And now you ask what it's painful for?

Guys, if you want to mess up code, the #1 rule is:
 - make complex code to handle insane situations

You're well on your way to do that.

Don't hardlink git trees. It's a bug to do so. It will eventually change 
the other git tree.

Hardlink git _object_ directories. That's a totally different thing.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to