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

Re: [RFC PATCH 06/19] Factor ref updating out of fetch_with_import

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:47:38

On Fri, Oct 30, 2009 at 00:10, Daniel Barkalow [off-list ref] wrote:
Actually, I think the problem is that builtin-clone will always default to
setting up a refspec of "refs/heads/*:refs/remotes/origin/*", but that
doesn't actually make any sense if the source repository isn't presented
as having refs names like "refs/heads/*". The immediate problem that you
don't get HEAD because it's a symref to something outside the pattern is
somewhat secondary to the general problem that you don't get anything at
all, because everything's outside the pattern.
Ah, I didn't realize that as long as HEAD is a symref to something in
refs/heads/* it would be fetched.
I don't really think that presenting the real refs in refs/<vcs>/*, and
having the list give symrefs to them from refs/heads/* and refs/tags/*
really makes sense; I think it would be better to rework fetch_with_import
and the list provided by a foreign vcs helper such that it can present
refs with normal names (refs/heads/*, refs/tags/*, etc) if the foreign vcs
has standards that correspond to branches and tags. Then "clone" would
work normally.
Perhaps we could introduce an additional phase before import to set
the default refspec? If we could tell git that we want
"refs/heads/*:refs/hg/origin/*" before line 468 "if (option_bare) {",
that would save us a lot of trouble. Does that sound like a good idea?
It would mean we have to move the transport_get part up a bit, but I
don't think that will be a problem. A svn helper for example might
respond the following to the "refspec" command:
"refs/heads/trunkr:refs/svn/origin/trunk"
"refs/tags/*:refs/svn/origin/tags/*"
"refs/heads/*:refs/svn/origin/branches/*"

How does that sound?

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help