git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Pulling from refs/remotes/ ?

From
Han-Wen Nienhuys <hanwen@xs4all.nl>
Date
May 25, 2007, 02:24 UTC
Message-ID
<465648EA.8070608@xs4all.nl>
In-Reply-To
<7v3b1lvfc5.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano escreveu:
Show 17 quoted lines
> Han-Wen Nienhuys <hanwen@xs4all.nl> writes:
> 
>> Yes, that works, thanks. Wouldn't it be more consistent with this
>> reasoning to disallow 
>>
>>   git pull . LOCAL-BRANCH 
>>
>> too?
> 
> I do not think so.
> 
> If somebody else (or yourself) did:
> 
> 	$ git pull $dir LOCAL-BRANCH
> 
> (replace $dir with the `pwd` you would get in your repository),
> that would work.  Why shouldn't it work for yourself?
 
Because

"You are treating your local repository as if it is a remote repository somewhere else, namely, '.' (current repository)."

that was the justification for not being able to pull in a remote branch. This justification (which I disagree with) applies to this case as well.

I understand that we don't want people committing to remotes, because fetches will then later fail, but other than that, why should there be limitations on using a remote?

-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Pulling from refs/remotes/ ?”
  1. Han-Wen NienhuysMay 25, 2007
  2. Junio C HamanoMay 25, 2007
  3. Han-Wen NienhuysMay 25, 2007
  4. Junio C HamanoMay 25, 2007
  5. Han-Wen NienhuysMay 25, 2007
  6. Junio C HamanoMay 25, 2007
  7. Han-Wen NienhuysMay 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.