{"thread":{"id":"7382","subject":"[PATCH] write_sha1_from_fd() should make new objects read-only","startedAt":"2007-03-24T16:02:27Z","lastAt":"2007-03-24T16:02:27Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37887","messageId":"alpine.LFD.0.83.0703241159360.18328@xanadu.home","threadId":"7382","inReplyTo":null,"subject":"[PATCH] write_sha1_from_fd() should make new objects read-only","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-03-24T16:02:27Z","receivedAt":"2007-03-24T16:02:27Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"... like it is done everywhere else.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n---\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 940bab5..0897b94 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -2154,6 +2154,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,\n \t} while (1);\n \tinflateEnd(&stream);\n \n+\tfchmod(local, 0444);\n \tclose(local);\n \tSHA1_Final(real_sha1, &c);\n \tif (ret != Z_STREAM_END) {\n"}]}