From: Felipe Contreras Date: Thu, 16 May 2013 23:07:47 GMT Subject: Re: [PATCH 1/3] fetch: add --allow-local option Message-ID: In-Reply-To: <7vk3my6bu1.fsf@alter.siamese.dyndns.org> On Thu, May 16, 2013 at 1:04 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >>> If you come from "git pull" is "git fetch" + "git merge", >>> and if your current branch is integrating with your local branch, >> >> How many times do I have to say that 'git pull' is not 'git fetch' + >> 'git merge'? >> >> You must think everybody has 'merge.defaulttoupstream=true'. > > I am confused. What does that have anything to do with this topic? > It only affects what a lazy "git merge" (without any other parameter > on the command line) does, doesn't it? And that's what we are talking about here; commands without any other parameter in the command like. So "git pull $nothing" is *not* "git fetch $nothing" + "git merge $nothing". > In the above "git fetch" + "git merge", I did not mean "git merge" > is literally what the command line of the command invoked > internally. "git pull" of course chooses what is to be merged. > > But that does not change the fact that before merging (or rebasing, > if you are running "git pull --rebase"), "git fetch" is done in > order to make sure the history you are merging with (or rebasing on > top of) is available locally and FETCH_HEAD is prepared so that "git > pull" can decide what to merge with (or rebase on). We are not talking about 'git pull .', we are talking about 'git fetch .', and it doesn't make any sense. > The merge.defaultToUpstream configuration does not change that, does > it? It changes the equation 'git pull' = 'git fetch' + 'git merge'. -- Felipe Contreras