From: Johannes Sixt <j6t@kdbg.org>
To: Jeff King <peff@peff.net>
Cc: Phillip Susi <psusi@cfl.rr.com>,
Jonathan Nieder <jrnieder@gmail.com>,
git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
Stephen Bash <bash@genarts.com>
Subject: Re: clone breaks replace
Date: Tue, 11 Jan 2011 20:48:57 +0100 [thread overview]
Message-ID: <201101112048.57326.j6t@kdbg.org> (raw)
In-Reply-To: <20110111173922.GB1833@sigill.intra.peff.net>
On Dienstag, 11. Januar 2011, Jeff King wrote:
> On Tue, Jan 11, 2011 at 10:24:01AM -0500, Phillip Susi wrote:
> > Yes, either a new branch or separate historical repository could be
> > published to pull the original history from, or git would need to pass
> > the --no-replace-objects flag to git-upload-pack on the server, causing
> > it to ignore the replace and send the original history.
>
> AFAIK, git can't pass --no-replace-objects to the server over git:// (or
> smart http). You would need a protocol extension.
Why would you have to? git-upload-pack never looks at replacement objects.
> And here's another corner case I thought of:
>
> Suppose you have some server S1 with this history:
>
> A--B--C--D
>
> and a replace object truncating history to look like:
>
> B'--C--D
>
> You clone from S1 and have only commits B', C, and D (or maybe even B,
> depending on the implementation). But definitely not A, nor its
> associated tree and blobs.
Why so? Cloning transfers the database using git-upload-pack,
git-pack-objects, git-index-pack, and git-unpack-objects. All of them have
object replacements disabled. (And AFAICS, there is no possibility to
*enable* it.)
Therefore, after cloning you get
A--B--C--D
and perhaps also the replacement object B'.
Hint: git grep read_replace_refs
-- Hannes
next prev parent reply other threads:[~2011-01-11 19:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 21:00 clone breaks replace Phillip Susi
2011-01-06 21:33 ` Jonathan Nieder
2011-01-06 21:59 ` Junio C Hamano
2011-01-07 19:43 ` Phillip Susi
2011-01-07 20:51 ` Jonathan Nieder
2011-01-07 21:15 ` Stephen Bash
2011-01-07 21:34 ` Jonathan Nieder
2011-01-07 21:44 ` Phillip Susi
2011-01-07 21:49 ` Jonathan Nieder
2011-01-07 22:09 ` Phillip Susi
2011-01-07 22:09 ` Jeff King
2011-01-07 22:58 ` Junio C Hamano
2011-01-11 5:36 ` Jeff King
2011-01-11 17:40 ` Junio C Hamano
2011-01-11 17:50 ` Jeff King
2011-01-11 17:56 ` Jonathan Nieder
2011-01-11 18:03 ` Jeff King
2011-01-11 19:32 ` Christian Couder
2011-01-08 0:43 ` Phillip Susi
2011-01-11 5:47 ` Jeff King
2011-01-11 6:52 ` Jonathan Nieder
2011-01-11 15:37 ` Phillip Susi
2011-01-11 18:22 ` Jonathan Nieder
2011-01-11 18:42 ` Phillip Susi
2011-01-11 15:24 ` Phillip Susi
2011-01-11 17:39 ` Jeff King
2011-01-11 19:48 ` Johannes Sixt [this message]
2011-01-11 19:51 ` Jeff King
2011-01-11 20:00 ` Johannes Sixt
2011-01-11 20:22 ` Phillip Susi
2011-01-11 20:50 ` Jonathan Nieder
2011-01-12 0:59 ` Phillip Susi
2011-01-14 20:53 ` small downloads and immutable history (Re: clone breaks replace) Jonathan Nieder
2011-01-15 5:27 ` Phillip Susi
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=201101112048.57326.j6t@kdbg.org \
--to=j6t@kdbg.org \
--cc=bash@genarts.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=psusi@cfl.rr.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).