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

[PATCH] Make creation of pack/pack-*.keep obey the umask

From
JGJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date
May 7, 2008, 17:25 UTC
Message-ID
<20080507172548.GI24525@obsidianresearch.com>
Prevents git clone from complaining on shared repositories

Initialized empty Git repository in /tmp/src/.git/ cpio: objects/pack/pack-601efa4cfe63e081c0591b463549aeba3f7c6164.keep: Cannot open: Permission denied 3376 blocks

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---

I'm uncertain if the keep files should be sticking around for so long, commit b8077709 makes it sounds like they are shorted lived lock files. In the case I have the keep file contains:

fetch-pack 20810 on bertha1

But, I don't see anything in fetch-pack to erase the keep file.. In any event making the file the same permissions as everything else can't hurt.

 index-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/index-pack.c b/index-pack.c
index 9c0c278..eb19e98 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -707,7 +707,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
 				 get_object_directory(), sha1_to_hex(sha1));
 			keep_name = name;
 		}
-		keep_fd = open(keep_name, O_RDWR|O_CREAT|O_EXCL, 0600);
+		keep_fd = open(keep_name, O_RDWR|O_CREAT|O_EXCL, 0666);
 		if (keep_fd < 0) {
 			if (errno != EEXIST)
 				die("cannot write keep file");
-- 
1.5.4.2
Next: Junio C Hamano
Message 1 of 2 in “Make creation of pack/pack-*.keep obey the umask”
  1. Make creation of pack/pack-*.keep obey the umaskJason Gunthorpe, May 7, 2008
  2. Junio C HamanoMay 22, 2008

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.