Hi Torsten, On Mon, 20 Jan 2014, Torsten Bögershausen wrote: > (No top-posting, please see my comments below) already very good! For extra brownie points, just edit the quoted part to reflect the abridged version needed to understand the context. > On 2014-01-20 15.02, Jochen wrote: > >On 01/16/2014 10:55 AM, Jochen Haag wrote: > > The rename command replaces a mv -f command of the original shell script. Obviously the -f option can also override a read-only file but rename can not on a network share. > > I allowed me to > a) reconstruct the original mail, Please note that together with an exceedingly flakey internet connection, not only having to scroll through the mail (most of which was actually not relevant to your reply) and having to delete most parts again ate up my complete Git time budget for today. Just something you might want to keep in mind. > b) add "+++" at the places where you added the stat() and chmod(), > c) and to send the question "is this a good implementation ?" to upstream git. > > I think your implementation makes sense. As I said in my other reply, I think that the problem would be addressed more generally in compat/mingw.c. It is to be doubted highly that upstream wants to handle cases such as "rename() cannot overwrite read-only files on Windows" everywhere they call rename() because the platforms upstream cares about do not have that problem. So we probably need just the same _wchmod we have in mingw_unlink also in mingw_rename. Ciao, Johannes