Re: [PATCH] pull: fail early if we know we can't merge from upstream
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:48
Carlos Martín Nieto [off-list ref] writes:
On Thu, 2013-04-11 at 10:37 -0700, Junio C Hamano wrote:quoted
quoted
+ fetch=$(git config --get-all "remote.$use_remote.fetch") + if [ -z "$fetch" ]; then + return + fiHmm, it is probably correct to punt on this case, but it defeats large part of the effect of your effort, doesn't it? We fetch what is covered by remote.$name.fetch _and_ what need to complete the merge operation (otherwise branch.$name.merge that is not covered by remote.$there.fetch will not work). So [remote "origin"] url = $over_there [branch "master"] remote = origin merge = refs/heads/master would still fetch refs/heads/master from there and merge it.If you run 'git pull' in this situation, then everything's fine and the right thing gets merged.
My mistake. You are trying to reject an obviously bad case early, and because this is an obviously good case, you just let it be handled in the original codeflow (which should not find any issues in this set-up).