Re: [PATCH] pull: fail early if we know we can't merge from upstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carlos Martín Nieto <cmn@xxxxxxxx> writes:

> On Thu, 2013-04-11 at 10:37 -0700, Junio C Hamano wrote:
>
>> > +	fetch=$(git config --get-all "remote.$use_remote.fetch")
>> > +	if [ -z "$fetch" ]; then
>> > +		return
>> > +	fi
>> 
>> Hmm, 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).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]