Skip to content
/ git Public
forked from git/git

Commit

Permalink
rerere: make rr-cache fanout directory honor umask
Browse files Browse the repository at this point in the history
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@pobox.com>
  • Loading branch information
gitster committed Jul 9, 2012
1 parent 45d4fdc commit fd95633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rerere.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fd95633

Please sign in to comment.