From: Johan Herland Date: Thu, 26 Mar 2009 15:16:47 +0000 (+0100) Subject: Move chmod(foo, 0444) into move_temp_to_file() X-Git-Tag: v1.6.2.3~3^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fb8b193670b0c11d118185332efc899d6d01d5f4?ds=sidebyside;hp=fb8b193670b0c11d118185332efc899d6d01d5f4 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 Signed-off-by: Junio C Hamano ---