@matheusbsbs / matheus-bagliano / commits / b5b8d8141a
Fork 0

write_sha1_from_fd() should make new objects read-only

... like it is done everywhere else. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Nicolas Pitre committed Mar 24, 2007 at 12:02 UTC b5b8d8141af7d854cf481a640d07aed7bddfaaaa
1 file changed +1
sha1_file.c
+1
@@ -2154,6 +2154,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
2154 } while (1);
2155 inflateEnd(&stream);
2156
2157 + fchmod(local, 0444);
2158 close(local);
2159 SHA1_Final(real_sha1, &c);
2160 if (ret != Z_STREAM_END) {