From: Jeff King <peff@peff.net>
To: "Keller, Jacob E" <jacob.e.keller@intel.com>
Cc: "gitster@pobox.com" <gitster@pobox.com>,
"dr.khong@gmail.com" <dr.khong@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [Bug] data loss with cyclic alternates
Date: Sat, 12 Jul 2014 01:57:03 -0400 [thread overview]
Message-ID: <20140712055703.GA9655@sigill.intra.peff.net> (raw)
In-Reply-To: <1405101705.22963.27.camel@jekeller-desk1.amr.corp.intel.com>
On Fri, Jul 11, 2014 at 06:01:46PM +0000, Keller, Jacob E wrote:
> > Yeah, don't do that. A thinks "eh, the other guy must have it" and
> > B thinks the same. In general, do not prune or gc a repository
> > other repositories borrow from, even if there is no cycle, because
> > the borrowee does not know anythning about objects that it itself no
> > longer needs but are still needed by its borrowers.
> >
>
> Doesn't gc get run automatically at some points? Is the automatic gc run
> setup to avoid this problem?
No, the automatic gc doesn't avoid this. It can't in the general case,
as the parent repository does not know how many or which children are
pointed to it as an alternate. And the borrowing repository does not
even need to have write permission to the parent, so it cannot write a
backpointer.
If people are using alternates, they should probably turn off gc.auto in
the borrowee (it doesn't seem unreasonable to me to do so automatically
via "clone -s" in cases where we can write to the alternates repo, and
to issue a warning otherwise).
-Peff
next prev parent reply other threads:[~2014-07-12 5:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 9:37 [Bug] data loss with cyclic alternates Ephrim Khong
2014-07-11 16:01 ` Junio C Hamano
2014-07-11 18:01 ` Keller, Jacob E
2014-07-12 5:57 ` Jeff King [this message]
2014-07-14 22:05 ` Keller, Jacob E
2014-07-13 10:44 ` Ephrim Khong
2014-07-14 9:02 ` [PATCH] sha1_file: do not add own object directory as alternate Ephrim Khong
2014-07-14 10:47 ` Duy Nguyen
2014-07-14 12:53 ` [PATCH v2] " Ephrim Khong
2014-07-15 5:44 ` Johannes Sixt
2014-07-15 11:29 ` [PATCH v3] " Ephrim Khong
2014-07-15 19:26 ` Junio C Hamano
2014-07-16 6:42 ` Ephrim Khong
2014-07-15 19:33 ` Eric Sunshine
2014-07-15 19:48 ` Junio C Hamano
2014-07-16 6:47 ` Ephrim Khong
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=20140712055703.GA9655@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=dr.khong@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.e.keller@intel.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).