git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] rerere: make rr-cache fanout directory honor umask

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 9, 2012, 23:28 UTC
Message-ID
<7vsjd0ikfe.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<7vwr2cikwa.fsf@alter.siamese.dyndns.org>

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>
---
 rerere.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rerere.c b/rerere.c
index dcb525a..651c5de 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);
-- 
1.7.11.1.294.gf7b86df
Previous: Junio C HamanoNext: Jeff King
Message 9 of 10 in “git-clone ignores umask for working tree”
  1. Alex RiesenJul 6, 2012
  2. Daniel BarkalowJul 6, 2012
  3. Restore umasks influence on the permissions of work tree created by cloneAlex Riesen, Jul 7, 2012
  4. Junio C HamanoJul 9, 2012
  5. Alex RiesenJul 9, 2012
  6. Jeff KingJul 9, 2012
  7. Junio C HamanoJul 9, 2012
  8. Junio C HamanoJul 9, 2012
  9. rerere: make rr-cache fanout directory honor umaskJunio C Hamano, Jul 9, 2012
  10. Jeff KingJul 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.