Web lists-archives.com

Re: [PATCH] checkout files in-place




"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes:

>> +	file prevent creating new files at the same path. Note that Git will not
>> +	update read/write permissions according to umask.
>
> I'm wondering if it's worth a mention that running out of disk space (or
> quota) will cause data to be truncated.

Aside from us not having to worry about emulating the umask, another
reason why we prefer "create, complete the write, and then finally
rename" over "overwrite and let it fail in the middle" is that the
former makes sure we never leave the path in a bad state.  It either
has a complete copy of the old contents, or a complete copy of the
new contents, and a third-party process reading from sidelines would
not get a partial copy, regardless of disc-full issue.