Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: Git fast-import : Warning duplicated ref: refs/remotes/origin/master

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:51:21

Hi,

Matthieu Moy wrote:
Jonathan Nieder [off-list ref] writes:
quoted
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help