From: Johan Herland <johan@herland.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Shawn Pearce <spearce@spearce.org>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH 1/2] index-pack: Create .keep files with same permissions and .pack/.idx
Date: Sat, 02 Apr 2011 01:27:41 +0200 [thread overview]
Message-ID: <201104020127.41774.johan@herland.net> (raw)
In-Reply-To: <7vk4fdehps.fsf@alter.siamese.dyndns.org>
On Saturday 02 April 2011, Junio C Hamano wrote:
> I was responding to the motivation stated in the commit log message, the
> file-based "cp -r" copy or cpio clone, which are _not_ a safe thing to
> do.
Hmpf. I didn't know that clone --local --no-hardlinks was unsafe. If it's
not safe, should it still be the default behavior for a cross-filesystem
clone?
Furthermore, this lack of safety is not at all mentioned in the clone
documentation...
> Because "leftover .keep" alone is a good justification, I was hinting to
> drop that other motivation from the description altogether.
Whatever works best for you. What about this commit message instead?
While pushing to a remote repo, Git transiently adds a .keep file for the
pack being pushed, to protect it from a concurrent "git gc". Sometimes, when
the push fails or is aborted, the .keep file is left stale in the repo. This
causes problems for other users of the same repo, since the permissions on
the .keep file (0600) make it inaccessible even though the rest of the repo
is accessible (0444 modulo shared_repository setting).
There is no reason why the permission mode of a .keep file should be any
different from the permission mode of the corresponding .pack/.idx files.
Therefore, adjust the permission of .keep files from 0600 to 0444 modulo
the shared_repository setting.
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2011-04-01 23:27 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
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 [this message]
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=201104020127.41774.johan@herland.net \
--to=johan@herland.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
/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).