Re: [PATCH] repack.c: chmod +w before rename()

2014-01-24 Thread brian m. carlson
On Fri, Jan 24, 2014 at 10:05:14PM +0100, Torsten Bögershausen wrote: commit a1bbc6c0 repack: rewrite the shell script in C introduced a possible regression, when a Git repo is located on a Windows network share. When git gc is called on an already packed repository, it could fail like

Re: [PATCH] repack.c: chmod +w before rename()

2014-01-24 Thread Johannes Schindelin
Hi Brian, On Fri, 24 Jan 2014, brian m. carlson wrote: On Fri, Jan 24, 2014 at 10:05:14PM +0100, Torsten Bögershausen wrote: diff --git a/builtin/repack.c b/builtin/repack.c index ba66c6e..033b4c2 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -324,6 +324,10 @@ int

Re: [PATCH] repack.c: chmod +w before rename()

2014-01-24 Thread brian m. carlson
On Fri, Jan 24, 2014 at 11:24:36PM +0100, Johannes Schindelin wrote: In general, I'm wary of changing permissions on a file to suit Windows's rename because of the symlink issue and the security issues that can result. I agree on the Windows issue. I personally feel that if Windows needs

Re: [PATCH] repack.c: chmod +w before rename()

2014-01-24 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: Another solution could be to do the chmod +x in mingw_rename(). This may be done in another commit, because a) It improves git gc only when Git for Windows is used on the client machine b) Windows refuses to delete a file when the file is

Re: [PATCH] repack.c: chmod +w before rename()

2014-01-24 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: In any case, I'd rather change the permissions only when the rename failed. *And* I feel uncomfortable ignoring the return value... Good judgement I'd agree with 100%. Thanks. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] repack.c: chmod +w before rename()

2014-01-24 Thread Mike Hommey
On Fri, Jan 24, 2014 at 10:49:13PM +, brian m. carlson wrote: On Fri, Jan 24, 2014 at 11:24:36PM +0100, Johannes Schindelin wrote: In general, I'm wary of changing permissions on a file to suit Windows's rename because of the symlink issue and the security issues that can result.