aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-03-24 12:02:27 -0400
committerJunio C Hamano <junkio@cox.net>2007-03-24 22:32:41 -0700
commitb5b8d8141af7d854cf481a640d07aed7bddfaaaa (patch)
tree8fe350f55ef3362db697fdacbd1f826c27b7017d
parent0e55181f29ee6599ab6888ac54d186c83d355a70 (diff)
downloadgit-b5b8d8141af7d854cf481a640d07aed7bddfaaaa.tar.gz
git-b5b8d8141af7d854cf481a640d07aed7bddfaaaa.tar.xz
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>
-rw-r--r--sha1_file.c1
1 files changed, 1 insertions, 0 deletions
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) {