From b5b8d8141af7d854cf481a640d07aed7bddfaaaa Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sat, 24 Mar 2007 12:02:27 -0400 Subject: [PATCH] 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 --- sha1_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sha1_file.c b/sha1_file.c index e412c70f27..0897b945e5 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) { -- 2.11.4.GIT