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

Re: [PATCH] Fix pulling into the same branch.

From
Junio C Hamano <junkio@cox.net>
Date
Sep 11, 2005, 18:41 UTC
Message-ID
<7vvf17saza.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0509111054590.3242@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 13 quoted lines
> On Sun, 11 Sep 2005, Junio C Hamano wrote:
>> 
>> Yes, but the issue becomes how we can reliably tell if a
>> repository is naked or has an associated working tree.
>
> You can't "git pull" into a naked thing anyway. And
>
> 	git-read-tree -m -u <old-head> <new-head>
>
> should always do the right thing (ie if there is dirty state that would be
> updated, it will fail gracefully).
>
> Or did I miss something?
No, I just stated my view poorly.

You cannot do pull into a naked one, but you can still fetch into it. My comment Johannes was responding to was what to do when you do 'git fetch' into the repository associated with your working tree and your branch is fast forwarded. We obviously want to prevent it from happening. However, it is OK to do so if the fetch is happening into a naked one and I was wondering if there is a reliable way to tell that situation and allowing that.

Previous: Linus TorvaldsNext: Johannes Schindelin
Message 6 of 7 in “RE: [PATCH] Fix pulling into the same branch.”
  1. Luck, TonyAug 26, 2005
  2. Junio C HamanoAug 27, 2005
  3. Johannes SchindelinSep 11, 2005
  4. Junio C HamanoSep 11, 2005
  5. Linus TorvaldsSep 11, 2005
  6. Junio C HamanoSep 11, 2005
  7. Johannes SchindelinSep 11, 2005

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.