From: Nicolas Pitre Date: Sat, 24 Mar 2007 16:02:27 +0000 (-0400) Subject: write_sha1_from_fd() should make new objects read-only X-Git-Tag: v1.5.1-rc2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b5b8d8141af7d854cf481a640d07aed7bddfaaaa;p=git.git write_sha1_from_fd() should make new objects read-only ... like it is done everywhere else. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff --git a/sha1_file.c b/sha1_file.c index e412c70f2..0897b945e 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2154,6 +2154,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer, } while (1); inflateEnd(&stream); + fchmod(local, 0444); close(local); SHA1_Final(real_sha1, &c); if (ret != Z_STREAM_END) {