git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Subject: Re: [PATCH] Make creation of pack/pack-*.keep obey the umask
Date: Wed, 21 May 2008 19:02:02 -0700	[thread overview]
Message-ID: <7v1w3vxfj9.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080507172548.GI24525@obsidianresearch.com> (Jason Gunthorpe's message of "Wed, 7 May 2008 11:25:48 -0600")

Last night I was going through old mail-logs and found this , which I
think is still needed.  Does anybody see anything wrong with them?

Jason Gunthorpe <jgunthorpe@obsidianresearch.com> writes:

> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2008-05-22  2:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 17:25 [PATCH] Make creation of pack/pack-*.keep obey the umask Jason Gunthorpe
2008-05-22  2:02 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v1w3vxfj9.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jgunthorpe@obsidianresearch.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).