Re: Now what: multiple HEAD refs

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

Re: Now what: multiple HEAD refs

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

Alex Riesen [off-list ref] writes:
On 12/15/05, Junio C Hamano [off-list ref] wrote:
quoted
quoted
$ git pull . ref1 HEAD (notice the space!)
If you were too used to git merge, you would have wrote
HEAD before ref1, so that does not sound plausible ;-).
no, that I have remembered. What I constantly forget is the
space-vs-colon difference.
That statement sounds as if "git pull . ref1:HEAD" makes some
sense and you typed it without colon by mistake.  But it does
not make any sense to me; I am puzzled ... what are you trying
to achieve with "git pull . ref1:HEAD"?

The patch from Johannes feels right but I haven't had caffeine
yet, so..

Re: Now what: multiple HEAD refs

From: Alex Riesen <hidden>
Date: 2016-06-15 22:42:15

On 12/15/05, Junio C Hamano [off-list ref] wrote:
quoted
quoted
quoted
$ git pull . ref1 HEAD (notice the space!)
If you were too used to git merge, you would have wrote
HEAD before ref1, so that does not sound plausible ;-).
no, that I have remembered. What I constantly forget is the
space-vs-colon difference.
That statement sounds as if "git pull . ref1:HEAD" makes some
sense and you typed it without colon by mistake.  But it does
exactly.
not make any sense to me; I am puzzled ... what are you trying
to achieve with "git pull . ref1:HEAD"?
merge branch ref1 into current. Is that not a correct refspec?

Re: Now what: multiple HEAD refs

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:15

Hi,

On Thu, 15 Dec 2005, Alex Riesen wrote:
quoted
not make any sense to me; I am puzzled ... what are you trying
to achieve with "git pull . ref1:HEAD"?
merge branch ref1 into current. Is that not a correct refspec?
No, it is not correct. To pull means that you want to merge the fetched 
ref (your ref1), and store the result in the current branch.

But if you write "ref1:HEAD", you pretend that you want to fast-forward 
the local branch "HEAD" to ref1, and get an error if it is not 
forwardable.

In your case, I guess, "git pull ref1" is what you meant.

Hth,
Dscho

Re: Now what: multiple HEAD refs

From: Alex Riesen <hidden>
Date: 2016-06-15 22:42:15

On 12/15/05, Johannes Schindelin [off-list ref] wrote:
quoted
quoted
not make any sense to me; I am puzzled ... what are you trying
to achieve with "git pull . ref1:HEAD"?
merge branch ref1 into current. Is that not a correct refspec?
No, it is not correct. To pull means that you want to merge the fetched
ref (your ref1), and store the result in the current branch.

But if you write "ref1:HEAD", you pretend that you want to fast-forward
the local branch "HEAD" to ref1, and get an error if it is not
forwardable.

In your case, I guess, "git pull ref1" is what you meant.
I did, I guess...
Confused now.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help