Re: [PATCH] Fix pulling into the same branch.
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:05
Linus Torvalds [off-list ref] writes:
On Sun, 11 Sep 2005, Junio C Hamano wrote:quoted
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.