{"thread":{"id":"13420","subject":"[PATCH] Make creation of pack/pack-*.keep obey the umask","startedAt":"2008-05-07T17:25:48Z","lastAt":"2008-05-22T02:02:02Z","messageCount":2,"participants":["Jason Gunthorpe","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"76311","messageId":"20080507172548.GI24525@obsidianresearch.com","threadId":"13420","inReplyTo":null,"subject":"[PATCH] Make creation of pack/pack-*.keep obey the umask","fromName":"Jason Gunthorpe","fromEmail":"jgunthorpe@obsidianresearch.com","sentAt":"2008-05-07T17:25:48Z","receivedAt":"2008-05-07T17:25:48Z","isPatch":true,"sender":{"key":"jgunthorpe@obsidianresearch.com","avatar":null},"body":"Prevents git clone from complaining on shared repositories\n\nInitialized empty Git repository in /tmp/src/.git/\ncpio: objects/pack/pack-601efa4cfe63e081c0591b463549aeba3f7c6164.keep: Cannot open: Permission denied\n3376 blocks\n\nSigned-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>\n---\n\nI'm uncertain if the keep files should be sticking around for so long,\ncommit b8077709 makes it sounds like they are shorted lived lock\nfiles. In the case I have the keep file contains:\n\nfetch-pack 20810 on bertha1\n\nBut, I don't see anything in fetch-pack to erase the keep file.. In\nany event making the file the same permissions as everything else\ncan't hurt.\n\n index-pack.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/index-pack.c b/index-pack.c\nindex 9c0c278..eb19e98 100644\n--- a/index-pack.c\n+++ b/index-pack.c\n@@ -707,7 +707,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name,\n \t\t\t\t get_object_directory(), sha1_to_hex(sha1));\n \t\t\tkeep_name = name;\n \t\t}\n-\t\tkeep_fd = open(keep_name, O_RDWR|O_CREAT|O_EXCL, 0600);\n+\t\tkeep_fd = open(keep_name, O_RDWR|O_CREAT|O_EXCL, 0666);\n \t\tif (keep_fd < 0) {\n \t\t\tif (errno != EEXIST)\n \t\t\t\tdie(\"cannot write keep file\");\n-- \n1.5.4.2\n"},{"id":"77442","messageId":"7v1w3vxfj9.fsf@gitster.siamese.dyndns.org","threadId":"13420","inReplyTo":"20080507172548.GI24525@obsidianresearch.com","subject":"Re: [PATCH] Make creation of pack/pack-*.keep obey the umask","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-05-22T02:02:02Z","receivedAt":"2008-05-22T02:02:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Last night I was going through old mail-logs and found this , which I\nthink is still needed.  Does anybody see anything wrong with them?\n\nJason Gunthorpe <jgunthorpe@obsidianresearch.com> writes:\n\n> Prevents git clone from complaining on shared repositories\n>\n> Initialized empty Git repository in /tmp/src/.git/\n> cpio: objects/pack/pack-601efa4cfe63e081c0591b463549aeba3f7c6164.keep: Cannot open: Permission denied\n> 3376 blocks\n>\n> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>\n> ---\n>\n> I'm uncertain if the keep files should be sticking around for so long,\n> commit b8077709 makes it sounds like they are shorted lived lock\n> files. In the case I have the keep file contains:\n>\n> fetch-pack 20810 on bertha1\n>\n> But, I don't see anything in fetch-pack to erase the keep file.. In\n> any event making the file the same permissions as everything else\n> can't hurt.\n>\n>  index-pack.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/index-pack.c b/index-pack.c\n> index 9c0c278..eb19e98 100644\n> --- a/index-pack.c\n> +++ b/index-pack.c\n> @@ -707,7 +707,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name,\n>  \t\t\t\t get_object_directory(), sha1_to_hex(sha1));\n>  \t\t\tkeep_name = name;\n>  \t\t}\n> -\t\tkeep_fd = open(keep_name, O_RDWR|O_CREAT|O_EXCL, 0600);\n> +\t\tkeep_fd = open(keep_name, O_RDWR|O_CREAT|O_EXCL, 0666);\n>  \t\tif (keep_fd < 0) {\n>  \t\t\tif (errno != EEXIST)\n>  \t\t\t\tdie(\"cannot write keep file\");\n> -- \n> 1.5.4.2\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}