git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org
Subject: Re: Problems with stale .keep files on git server
Date: Thu, 31 Mar 2011 15:04:29 -0400	[thread overview]
Message-ID: <20110331190429.GC16981@sigill.intra.peff.net> (raw)
In-Reply-To: <201103311246.25645.johan@herland.net>

On Thu, Mar 31, 2011 at 12:46:25PM +0200, Johan Herland wrote:

> Some questions:
> 
> 1. Why does the .keep file have 0600 permissions (preventing a local
>    clone by any other user)

The relevant code is in 6e180cd (Make sure objects/pack exists before
creating a new pack, 2009-02-24). I don't see anything particular about
the mode, so I suspect it was simply habit to make tempfiles restricted.

There is nothing secret in the contents, so I don't see any reason to
loosen it to the same permissions as the packfiles themselves.

> 2. Under which conditions will receive-pack leave stale .keep files
>    in the filesystem? Is this a bug?

I didn't look at the code, but I think we have to accept the possibility
that it may leave stale ones in the case of power failure or accidental
death by signal. So maybe there are places to fix, but we will still
have to deal with stale ones.

> 3. Do I need to scan for and remove stale .keep files in a cron job
>    in order to keep repos healthy and clonable?

If we fix (1), then hopefully it is not as much of an issue. But
probably "git gc" should clean up stale ones after a while.

-Peff

  reply	other threads:[~2011-03-31 19:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 10:46 Problems with stale .keep files on git server Johan Herland
2011-03-31 19:04 ` Jeff King [this message]
2011-04-01  1:29   ` [PATCH 1/2] index-pack: Create .keep files with same permissions and .pack/.idx Johan Herland
2011-04-01 21:39     ` Junio C Hamano
2011-04-01 21:41       ` Jeff King
2011-04-01 21:49       ` Shawn Pearce
2011-04-01 22:21         ` Junio C Hamano
2011-04-01 23:27           ` Johan Herland
2011-04-02  4:21             ` Junio C Hamano
2011-04-03  1:01               ` Johan Herland
2011-04-01 23:37         ` Johan Herland
2011-04-01  1:34   ` [RFC/PATCH 2/2] repack: Remove stale .keep files before repacking Johan Herland
2011-04-01  1:41     ` Jeff King
2011-04-01  8:12       ` Johan Herland

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=20110331190429.GC16981@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    /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).