On Mon, Jul 09, 2012 at 04:28:21PM -0700, Junio C Hamano wrote: > This is the last remaining call to mkdir(2) that restricts the permission > bits by passing 0755. Just use the same mkdir_in_gitdir() used to create > the leaf directories. > > Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> Looks obviously correct to me. I notice that grepping finds a few 0644 modes, too. Most of them are false-positives (e.g., we store and transmit 100644 as a shorthand for "normal non-executable permissions"). This is the only one that looked legitimate to me: -- >8 -- Subject: [PATCH] add: create ADD_EDIT.patch with mode 0666 We should be letting the user's umask take care of restricting permissions. Even though this is a temporary file and probably nobody would notice, this brings us in line with other temporary file creations in git (e.g., choosing "e"dit from git-add--interactive). Signed-off-by: Jeff King <peff@xxxxxxxx> --- builtin/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/add.c b/builtin/add.c index 41edd63..815ac4b 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -287,7 +287,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix) argc = setup_revisions(argc, argv, &rev, NULL); rev.diffopt.output_format = DIFF_FORMAT_PATCH; DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES); - out = open(file, O_CREAT | O_WRONLY, 0644); + out = open(file, O_CREAT | O_WRONLY, 0666); if (out < 0) die (_("Could not open '%s' for writing."), file); rev.diffopt.file = xfdopen(out, "w"); -- 1.7.10.5.16.ga1c6f1c -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html