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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 12, 2013, 16:35 UTC
Message-ID
<7v38uvg11d.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1365761838.2468.21.camel@flaca.cmartin.tk>
Carlos Martín Nieto <cmn@elego.de> writes:
Show 23 quoted lines
> 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).

Previous: Carlos Martín Nieto
Message 4 of 4 in “pull: fail early if we know we can't merge from upstream”
  1. pull: fail early if we know we can't merge from upstreamCarlos Martín Nieto, Apr 11, 2013
  2. Junio C HamanoApr 11, 2013
  3. Carlos Martín NietoApr 12, 2013
  4. Junio C HamanoApr 12, 2013

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.