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

2005-08-14 Thread Matthias Urlichs
Hi, Chris Wedgwood wrote: > 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? >

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: [RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Junio C Hamano wrote: > > Petr Baudis <[EMAIL PROTECTED]> writes: > > Rewrite refs in place in receive-pack & friends > > > > When updating a ref, it would write a new file with the new ref and > > then rename it, overwriting the original file. The problem is that > > this d

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

2005-08-13 Thread Junio C Hamano
Petr Baudis <[EMAIL PROTECTED]> writes: > Rewrite refs in place in receive-pack & friends > > When updating a ref, it would write a new file with the new ref and > then rename it, overwriting the original file. The problem is that > this destroys permissions and ownership of the original file, whi

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

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Petr Baudis wrote: > > * Does this break atomicity? > > 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? That's not the

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

2005-08-13 Thread Petr Baudis
Rewrite refs in place in receive-pack & friends When updating a ref, it would write a new file with the new ref and then rename it, overwriting the original file. The problem is that this destroys permissions and ownership of the original file, which is troublesome especially in multiuser environm