From: Jakub Narebski <jnareb@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Sergio <sergio.callegari@gmail.com>, git@vger.kernel.org
Subject: Re: Questions about the new refs/replace mechanism
Date: Tue, 13 Oct 2009 14:33:49 -0700 (PDT) [thread overview]
Message-ID: <m3skdnf08l.fsf_-_@localhost.localdomain> (raw)
In-Reply-To: <4AD31EBF.6090307@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
> Sergio schrieb:
> > 3) If I remember correctly, there was a reason why grafts were not
> > considered suitable for transferring across repos. Can someone
> > remind me about it? How does the replace mechanism address this
> > issue?
>
> The problem with grafts was that, for example, git-pack-objects obeyed the
> graft, and could create a broken repository by removing grafted-away
> objects. And since git-fsck also obeyed the graft, it did not notice the
> breakage.
To be more detailed, the problem is that if git-pack-objects, git-fsck
and git-gc obeys grafts, it can create broken repository by removing
grafted away objects. If git-pack-objects, git-fsck and git-gc
doesn't obey grafts, it can created broken repository (well, broken if
we include grafts) by removing grafted in objects.
>
> OTOH, history walkers (upload-pack, send-pack, pack-objects) and fsck
> never obey replace entries in the history. But they do keep track of them
> (and the history that they reference) because they are referenced from the
> refs/replace namespace.
In the case of refs/replace git-pack-objects, git-fcsk and git-gc
doesn't "obey" refs/replace... but replaced objects are protected by
pruning by being referenced from refs/replace ref.
One of problems with grafts file was to come up with rule what do do
if both repository you fetch from and the repository you fetch into
have both grafts; in the case of refs/replace the usual rules about
(conflicting) refs apply.
It is also easy to select whether to follow refs/replace or not: you
fetch them into your refs/replace or not; you would have to add extra
option to git-fetch to select whether to fetch and follow grafts in
remote you fetch from.
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2009-10-13 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 10:23 Questions about the new Sergio
2009-10-12 10:47 ` David Kågedal
2009-10-12 12:19 ` Johannes Sixt
2009-10-12 17:04 ` Sergio Callegari
2009-10-12 21:06 ` Junio C Hamano
2009-10-13 7:49 ` Sergio Callegari
2009-10-12 21:54 ` Christian Couder
2009-10-12 19:03 ` Dmitry Potapov
2009-10-13 21:33 ` Jakub Narebski [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=m3skdnf08l.fsf_-_@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=sergio.callegari@gmail.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).