Re: Pulling from refs/remotes/ ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano escreveu:
> Han-Wen Nienhuys <hanwen@xxxxxxxxx> writes:
> 
>> why can't I pull from a remote?  I can do 
>>
>>   git log REMOTE-BRANCH
>>   git diff BRANCH REMOTE-BRANCH
>>
>> etc. But pulling yields
>>
>>  [hanwen@haring foobar]$ git pull . origin/nonrandr-setup
>>  error: no such remote ref refs/heads/origin/nonrandr-setup
>>  Fetch failure: .
>>
>> also, "Fetch failure: .", what is that supposed to mean?
> 
> You are treating your local repository as if it is a remote
> repository somewhere else, namely, '.' (current repository).
> 
> Notice "git log" and "git diff" are LOCAL operations?  "git
> pull" is "git fetch" which is a remote operation (i.e. it
> interacts with a remote repository) followed by "git merge"
> which is a local operation to merge in what was fetched or what
> you already have locally.
> 
> I think you would want:
> 
> 	git merge REMOTE-BRANCH
> 
> e.g. "git merge origin/nonrandr-setup".

Yes, that works, thanks. Wouldn't it be more consistent with this
reasoning to disallow 

  git pull . LOCAL-BRANCH 

too?

I still think that "fetch failure" is a bad error message. 
What information does it convey?


-- 
 Han-Wen Nienhuys - hanwen@xxxxxxxxx - http://www.xs4all.nl/~hanwen

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux