[RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-12 Thread Chris Wedgwood
Sometimes (often actually) I do: cp -Rl tree1 tree2# new tree with implied CoW semantics cd tree2 cg-update # or similar the latter well frob .git/HEAD or similar by doing echo foo > bar which obviously breaks the intended CoW semantics. How would pe

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-12 Thread Chris Wedgwood
On Tue, Jul 12, 2005 at 09:37:00PM +, Junio C Hamano wrote: > > if [ "$newhead" ]; then > > echo "Committed as $newhead." > > - echo $newhead >$_git/HEAD > > + echo_to_file $newhead $_git/HEAD > > [ "$merging" ] && rm $_git/merging $_git/merging-sym $_git/merge-base > > Good inten

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-13 Thread Chris Wedgwood
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/ by default. Thanks for pointing that out. I honestly never noticed that. How about the following? echo_to_file() { local DEST="$2"

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-13 Thread Chris Wedgwood
On Wed, Jul 13, 2005 at 10:07:24PM +0200, Matthias Urlichs wrote: > You lose if the link is relative and the symlink is not in the > current directory. Cogito doesn't create such links in my (limited_ experience. Why would anyone else do that? > You also lose on systems where the empty filename

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-13 Thread Chris Wedgwood
On Wed, Jul 13, 2005 at 01:05:02PM -0700, Linus Torvalds wrote: > This is really complicated, for no good reason. What should I be doing? > The _object_ directories should be linked, but it's really wrong to link > the "refs/" directories and expect them to have COW behaviour. I'm confused. T

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-13 Thread Chris Wedgwood
On Wed, Jul 13, 2005 at 02:05:35PM -0700, Linus Torvalds wrote: > > and .git/refs/head/master is hardlinked between both trees. > > AND THAT IS WRONG. OK, I was more-or-less assuming that 'cp -Rl tree1 tree2' was always a valid thing to do. Clearly if it's not then all of this is somewhat moot

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-13 Thread Chris Wedgwood
On Wed, Jul 13, 2005 at 02:33:43PM -0700, Linus Torvalds wrote: > Hmm.. I don't think it's necessarily wrong, although as you say, > your editor had better DTRT. It does. I assume probably everything does but I never really checked. > That said, even if your editor doesn't, at least you won't c

Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

2005-07-13 Thread Chris Wedgwood
On Wed, Jul 13, 2005 at 02:23:18PM -0700, Linus Torvalds wrote: > If you really want to do something like this, then you should do it like > this: > > update_head() { except there are a number of places I need to frob things in Cogito and they are not all for the head. If the head is speci

Re: [RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Chris Wedgwood
On Sat, Aug 13, 2005 at 11:47:25PM +0200, Petr Baudis wrote: > I think it does not in real setups, since thanks to O_RDWR the > file should be overwritten only when the write() happens. > Can a 41-byte write() be non-atomic in any real conditions? yes if you journal metadata on

Re: Make "git-ls-files" work in subdirectories

2005-08-21 Thread Chris Wedgwood
On Sun, Aug 21, 2005 at 12:55:33PM -0700, Linus Torvalds wrote: > - } else if (!strcmp(arg, "-t")) { > + continue; > + } > + if (!strcmp(arg, "-t")) { > tag_cached = "H "; > tag_unmerged = "M "; >

Re: Make "git-ls-files" work in subdirectories

2005-08-21 Thread Chris Wedgwood
On Sun, Aug 21, 2005 at 04:17:52PM -0700, Linus Torvalds wrote: > getopt() is too limited, and getopt_long() is very glibc-specific > and thus inherently evil. And the complexity of doing autoconf or > similar is worse than just doing it by hand. what about libpopt? - To unsubscribe from this lis

Re: Building git on Fedora

2005-04-17 Thread Chris Wedgwood
On Sun, Apr 17, 2005 at 07:25:49PM -0400, jeff millar wrote: > Here's a tidbit to enable git to compile on Fedora. Add the > following line to /etc/rc.d/rc.local... > >ln -sf /lib/modules/`uname -r`/build/include/linux /usr/local/include/linux I can't see why this should be needed. What bre

Re: [PATCH] provide better committer information to commit-tree.c

2005-04-18 Thread Chris Wedgwood
On Mon, Apr 18, 2005 at 05:45:48PM -0700, Greg KH wrote: > But if you really don't like it, and you don't want anyone trying to > hide anything, at least allow for a proper domainname. On my boxes, > the domainname doesn't show up at all without that patch (just the > getdomainname() part). I'll

Re: enforcing DB immutability

2005-04-20 Thread Chris Wedgwood
On Wed, Apr 20, 2005 at 09:53:20AM +0200, Ingo Molnar wrote: > so the only sensible thing the editor/tool can do when it wants to > change the file is precisely what we want: it will copy the > hardlinked files's contents to a new file, and will replace the old > file with the new file - a copy on