All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: "Jérémie NIKAES" <jeremie.nikaes@gmail.com>,
	git@vger.kernel.org, "Sylvain Boulme" <Sylvain.Boulme@imag.fr>,
	"Mike Hommey" <mh@glandium.org>,
	"Daniel Barkalow" <barkalow@iabervon.org>,
	"Sverre Rabbelier" <srabbelier@gmail.com>
Subject: Re: Git fast-import : Warning duplicated ref: refs/remotes/origin/master
Date: Mon, 30 May 2011 15:13:51 -0500	[thread overview]
Message-ID: <20110530201351.GB14427@elie> (raw)
In-Reply-To: <vpqzkm4gef2.fsf@bauges.imag.fr>

Hi,

Matthieu Moy wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>>  sub mw_capabilities {
>>  #	print STDOUT "fetch\n";
>> +	print STDOUT "refspec refs/heads/*:refs/mediawiki/$remotename/*\n";
>
> Is this "mediawiki" comming from the URL (mediawiki::...), or is it just
> a convention you've set?
>
> We've tried with refspec refs/heads/*:refs/remotes/origin/*, but without
> success.

Yes, I stole the convention for the namespace name from the commit message
to v1.7.0-rc0~62^2~19 (Allow helper to map private ref names into
normal names, 2009-11-18).

> Do I understand correctly that the "pull" is done in 3 stages:
>
> 1) import into refs/mediawiki/origin
>
> 2) fetch the imported ref into refs/remotes/origin
>
> 3) and merge as usual into the current branch
>
> ?
>
> If so, I don't understand why the distinction between 1) and 2) is
> necessary, and why not to fetch directly into refs/remotes/origin/. IOW,
> in which case is refs/remotes/origin/master different from
> refs/mediawiki/origin/master for example?

That's a good question.  One answer is that fetching to elsewhere
allows the transport machinery to take care of rejecting non-fast-forward
fetches and pretty-printing the ref update information:

 From mediawiki::http://localhost/mediawiki
    479ee21..accd2c1  master     -> origin/master

I think in the long term, importing to no ref at all as Sverre
suggested and teaching the transport-helper to do the ref update would
make more sense.

Regards,
Jonathan

  parent reply	other threads:[~2011-05-30 20:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 16:09 Git fast-import : Warning duplicated ref: refs/remotes/origin/master Jérémie NIKAES
2011-05-29 23:24 ` Jonathan Nieder
2011-05-30 14:44   ` Jérémie NIKAES
2011-05-30 14:52     ` Jonathan Nieder
2011-05-30 15:07       ` Jérémie NIKAES
2011-05-30 15:52         ` [PATCH] Documentation: do not misinterpret refspecs as bold text (Re: Git fast-import : Warning duplicated ref: refs/remotes/origin/master) Jonathan Nieder
2011-05-30 16:40           ` remote helpers: best practices for using the "refspec" capability Jonathan Nieder
2011-05-30 17:43             ` Daniel Barkalow
2011-05-30 18:04               ` Sverre Rabbelier
2011-05-30 17:35     ` Git fast-import : Warning duplicated ref: refs/remotes/origin/master Jonathan Nieder
2011-05-30 19:46       ` Matthieu Moy
2011-05-30 19:55         ` Jérémie NIKAES
2011-05-30 20:13         ` Jonathan Nieder [this message]
2011-05-30 20:32           ` Jérémie NIKAES
2011-05-30 23:09             ` Sverre Rabbelier

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=20110530201351.GB14427@elie \
    --to=jrnieder@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=Sylvain.Boulme@imag.fr \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=jeremie.nikaes@gmail.com \
    --cc=mh@glandium.org \
    --cc=srabbelier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.