Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 04:46:20PM +0200, Torsten Bögershausen wrote: > The value of fstat() is not checked here: > (indicated by a compiler warning, that contents_sz may be uninitalized. > > config.c: > int git_config_set_multivar_in_file( > //around line 2063 (the only call to fstat()) >

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Jeff King
On Tue, Jun 30, 2015 at 04:34:13PM +0200, Karsten Blees wrote: > Renaming to an existing file doesn't work on Windows network shares if the > target file is open. > > munmap() the old config file before commit_lock_file. > > Signed-off-by: Karsten Blees Thanks for fixing this. Acked-by: Jeff

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Johannes Schindelin
Hi, On 2015-06-30 16:34, Karsten Blees wrote: > Renaming to an existing file doesn't work on Windows network shares if the > target file is open. > > munmap() the old config file before commit_lock_file. > > Signed-off-by: Karsten Blees ACK. Thanks, Dscho -- To unsubscribe from this list: se

Re: [PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Torsten Bögershausen
On 2015-06-30 16.34, Karsten Blees wrote: > Renaming to an existing file doesn't work on Windows network shares if the > target file is open. > > munmap() the old config file before commit_lock_file. > > Signed-off-by: Karsten Blees > --- > > See https://github.com/git-for-windows/git/issues/22

[PATCH] config.c: fix writing config files on Windows network shares

2015-06-30 Thread Karsten Blees
Renaming to an existing file doesn't work on Windows network shares if the target file is open. munmap() the old config file before commit_lock_file. Signed-off-by: Karsten Blees --- See https://github.com/git-for-windows/git/issues/226 Strangely, renaming to an open file works fine on local d