[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: Problems with stale .keep files on git server
From:       Jeff King <peff () peff ! net>
Date:       2011-03-31 19:04:29
Message-ID: 20110331190429.GC16981 () sigill ! intra ! peff ! net
[Download RAW message or body]

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
--
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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic