Skip to content

Commit fd95633

Browse files
committed
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 <[email protected]>
1 parent 45d4fdc commit fd95633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rerere.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static int do_plain_rerere(struct string_list *rr, int fd)
524524
continue;
525525
hex = xstrdup(sha1_to_hex(sha1));
526526
string_list_insert(rr, path)->util = hex;
527-
if (mkdir(git_path("rr-cache/%s", hex), 0755))
527+
if (mkdir_in_gitdir(git_path("rr-cache/%s", hex)))
528528
continue;
529529
handle_file(path, NULL, rerere_path(hex, "preimage"));
530530
fprintf(stderr, "Recorded preimage for '%s'\n", path);

0 commit comments

Comments
 (0)