Browse Source

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>
maint
Nicolas Pitre 18 years ago committed by Junio C Hamano
parent
commit
b5b8d8141a
  1. 1
      sha1_file.c

1
sha1_file.c

@ -2154,6 +2154,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
} while (1); } while (1);
inflateEnd(&stream); inflateEnd(&stream);


fchmod(local, 0444);
close(local); close(local);
SHA1_Final(real_sha1, &c); SHA1_Final(real_sha1, &c);
if (ret != Z_STREAM_END) { if (ret != Z_STREAM_END) {

Loading…
Cancel
Save