{"thread":{"id":"78","subject":"[PATCH] Really honor umask when creating files","startedAt":"2005-04-17T08:15:48Z","lastAt":"2005-04-17T08:15:48Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"457","messageId":"7v7jj124zv.fsf@assigned-by-dhcp.cox.net","threadId":"78","inReplyTo":null,"subject":"[PATCH] Really honor umask when creating files","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-17T08:15:48Z","receivedAt":"2005-04-17T08:15:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The stated plan was to create new files with either 0666 or 0777\nand let the system take care of applying umask().  Running\nfchmod afterwards defeats this plan, so drop it.\n\nYou still need to spell your octals with prefix in addition to\nthis patch.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n checkout-cache.c |    2 --\n 1 files changed, 2 deletions(-)\n\ncheckout-cache.c: a87022a97c4604ef42ae6c31d641dc749a076ca3\n--- checkout-cache.c\n+++ checkout-cache.c\t2005-04-17 01:11:17.000000000 -0700\n@@ -62,8 +62,6 @@\n \t\t\tfd = open(path, O_WRONLY | O_TRUNC | O_CREAT, mode);\n \t\t}\n \t}\n-\tif (fd >= 0)\n-\t\tfchmod(fd, mode);\n \treturn fd;\n }\n \n\n"}]}