From: Junio C Hamano Date: Mon, 9 Jul 2012 23:27:49 +0000 (-0700) Subject: rerere: make rr-cache fanout directory honor umask X-Git-Tag: v1.7.11.3~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd9563385f34c888408cf4f8683b1745ca2cf77a;p=thirdparty%2Fgit.git rerere: make rr-cache fanout directory honor umask 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 --- diff --git a/rerere.c b/rerere.c index dcb525a4d0..651c5def92 100644 --- a/rerere.c +++ b/rerere.c @@ -524,7 +524,7 @@ static int do_plain_rerere(struct string_list *rr, int fd) continue; hex = xstrdup(sha1_to_hex(sha1)); string_list_insert(rr, path)->util = hex; - if (mkdir(git_path("rr-cache/%s", hex), 0755)) + if (mkdir_in_gitdir(git_path("rr-cache/%s", hex))) continue; handle_file(path, NULL, rerere_path(hex, "preimage")); fprintf(stderr, "Recorded preimage for '%s'\n", path);