author | Johan Herland <johan@herland.net> | |
Thu, 26 Mar 2009 15:16:47 +0000 (16:16 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Mar 2009 05:10:58 +0000 (22:10 -0700) | ||
commit | fb8b193670b0c11d118185332efc899d6d01d5f4 | |
tree | 1d25d46394067edd7833aeb70e714ebcbe6389c7 | tree | snapshot |
parent | 5a688fe4706462dfa0a7932ef0c82c335c47e9ab | commit | diff |
Move chmod(foo, 0444) into move_temp_to_file()
When writing out a loose object or a pack (index), move_temp_to_file() is
called to finalize the resulting file. These files (loose files and packs)
should all have permission mode 0444 (modulo adjust_shared_perm()).
Therefore, instead of doing chmod(foo, 0444) explicitly from each callsite
(or even forgetting to chmod() at all), do the chmod() call from within
move_temp_to_file().
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When writing out a loose object or a pack (index), move_temp_to_file() is
called to finalize the resulting file. These files (loose files and packs)
should all have permission mode 0444 (modulo adjust_shared_perm()).
Therefore, instead of doing chmod(foo, 0444) explicitly from each callsite
(or even forgetting to chmod() at all), do the chmod() call from within
move_temp_to_file().
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c | diff | blob | history | |
http-push.c | diff | blob | history | |
http-walker.c | diff | blob | history | |
index-pack.c | diff | blob | history | |
sha1_file.c | diff | blob | history |