Re: Multiple pulls from the same branch in .git/remotes/origin

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Multiple pulls from the same branch in .git/remotes/origin

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:36

"Michael S. Tsirkin" [off-list ref] writes:
I get remote linus_master properly fetched into local origin.
Two questions:
1. Isn't is possible to pull from the same remote branch into multiple local
   branches?
Currently, no.  The underlying git-fetch-pack makes sure you do
not give the same branches twice on the command line.  I think
what the code actually tries to do is to make sure each of the
given refspecs is not ambiguous and matches something, but while
doing so it marks the remote ref that matched ineligible to
match again, which ends up showing the error message you saw.

It might not be too difficult to change it though.  This part of
the code is relatively old and I do not remember the details
offhand, other than I remember that the first time I saw it I
had the same confused "Huh?  we do not let a ref fetched twice?"
reaction ;-).

Re: Multiple pulls from the same branch in .git/remotes/origin

From: Michael S. Tsirkin <hidden>
Date: 2016-06-15 22:42:36

Quoting r. Junio C Hamano [off-list ref]:
Subject: Re: Multiple pulls from the same branch in .git/remotes/origin

"Michael S. Tsirkin" [off-list ref] writes:
quoted
I get remote linus_master properly fetched into local origin.
Two questions:
quoted
1. Isn't is possible to pull from the same remote branch into multiple local
   branches?
Currently, no.  The underlying git-fetch-pack makes sure you do
not give the same branches twice on the command line.  I think
what the code actually tries to do is to make sure each of the
given refspecs is not ambiguous and matches something, but while
doing so it marks the remote ref that matched ineligible to
match again, which ends up showing the error message you saw.

It might not be too difficult to change it though.  This part of
the code is relatively old and I do not remember the details
offhand, other than I remember that the first time I saw it I
had the same confused "Huh?  we do not let a ref fetched twice?"
reaction ;-).
At least, fix the error message?

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