git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: David Chanters <david.chanters@googlemail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
Date: Sun, 16 Sep 2012 04:42:29 +0200	[thread overview]
Message-ID: <CAP8UFD0sfBGT9OaGuS9OF68rdhoe1PTM4gYxE78z+NjTApF9Sw@mail.gmail.com> (raw)
In-Reply-To: <CACffvTroMt-s7X_DV9AHerzKdgz+xABXTd91aTUc2BtYO7QxCA@mail.gmail.com>

Hi,

On Sat, Sep 15, 2012 at 11:49 PM, David Chanters
<david.chanters@googlemail.com> wrote:
> Hi,
>
> On 15 September 2012 18:21, Junio C Hamano <gitster@pobox.com> wrote:
>
>> Assuming that they do, pushing the replacement ref makes the
>> replacing object available in the pushed-into repository, so
>> they will *not* rely on your repository.
>
> This makes sense.  But it is more the mechanics of what happens with
> needing to update the "fetch" line for the remote in .git/config I am
> more puzzled by.
>
> For example, if I have two repos -- repoA and repoB, where repoA
> contains the replace refs for repoB -- if I clone both repos with the
> intent of wanting to look at the two histories, what must I do in
> repoA to fetch the replace refs in the first place?
>
> I've tried:
>
> [remote "origin"]
>         fetch =
> +refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/*

Could you try the following:

[remote "origin"]
        fetch = +refs/replace/*:refs/replace/*
        fetch = +refs/heads/*:refs/remotes/origin/*


> But this results in:
>
> % git pull
> fatal: Invalid refspec
> '+refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/*'

Best,
Christian.

  reply	other threads:[~2012-09-16  2:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-15 12:02 Using git-replace in place of grafts -- and publishing .git/refs/replace between repos? David Chanters
2012-09-15 17:21 ` Junio C Hamano
2012-09-15 21:49   ` David Chanters
2012-09-16  2:42     ` Christian Couder [this message]
2012-09-16  6:04     ` Junio C Hamano

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=CAP8UFD0sfBGT9OaGuS9OF68rdhoe1PTM4gYxE78z+NjTApF9Sw@mail.gmail.com \
    --to=christian.couder@gmail.com \
    --cc=david.chanters@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).