Re: [PATCH v2] checkout files in-place

2018-06-11 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > ...And this seems to conflict with what Junio's summarized in > xmqqvaapb3r1@gitster-ct.c.googlers.com. I.e. (if I'm reading it > correctly) it's not correct to say that we unlink the existing file, > then replace it, don't we create a new one, and then

Re: [PATCH v2] checkout files in-place

2018-06-11 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 11 2018, Clemens Buchacher wrote: > When replacing files with new content during checkout, we do not write > to them in place. Instead we unlink and recreate the files in order to > let the system figure out ownership and permissions for the new file, > taking umask into account.

[PATCH v2] checkout files in-place

2018-06-11 Thread Clemens Buchacher
When replacing files with new content during checkout, we do not write to them in place. Instead we unlink and recreate the files in order to let the system figure out ownership and permissions for the new file, taking umask into account. It is safe to do this on Linux file systems, even if open