Re: [PATCH] Merge non-first refs that match first refspec

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Merge non-first refs that match first refspec

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:37

Junio C Hamano [off-list ref] writes:
Daniel Barkalow [off-list ref] writes:
quoted
Beats me; Junio, what's your test case?
I can paste tomorrow (it is a clone of git.git at work).  I do
not use .git/config but .git/remotes/origin and explicit four
separate Pull: lines and going over http.
Here are the files.  Note that I use traditional layout and
always have 'master' checked out when I initiate 'git pull'.

: xyzzy git.git/master; cat .git/config
[core]
	logallrefupdates = true

[diff]
	color = auto

[showbranch]
	default = --topo-order
	default = master
	default = next
	default = pu

[alias]
	co = checkout
: xyzzy git.git/master; cat .git/remotes origin
URL: http://repo.or.cz/r/alt-git.git/
Pull: master:origin
Pull: next:next
Pull: +pu:pu
Pull: maint:maint
Pull: todo:todo
: xyzzy git.git/master; git pull
Warning: No merge candidate found because value of config option
         "branch.master.merge" does not match any remote branch
         fetched.
No changes.
: xyzzy git.git/master; git version
git version 1.5.3.2.1060.gaf79f
: xyzzy git.git/master; exit

Re: [PATCH] Merge non-first refs that match first refspec

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:43:37

On Fri, 28 Sep 2007, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
Daniel Barkalow [off-list ref] writes:
quoted
Beats me; Junio, what's your test case?
I can paste tomorrow (it is a clone of git.git at work).  I do
not use .git/config but .git/remotes/origin and explicit four
separate Pull: lines and going over http.
Here are the files.  Note that I use traditional layout and
always have 'master' checked out when I initiate 'git pull'.

: xyzzy git.git/master; cat .git/config
[core]
	logallrefupdates = true

[diff]
	color = auto

[showbranch]
	default = --topo-order
	default = master
	default = next
	default = pu

[alias]
	co = checkout
: xyzzy git.git/master; cat .git/remotes origin
URL: http://repo.or.cz/r/alt-git.git/
Pull: master:origin
Pull: next:next
Pull: +pu:pu
Pull: maint:maint
Pull: todo:todo
The strcmp fails because the config uses an abbreviation and the server 
doesn't. Forget my first attempt, and try replacing the strcmp on line 105 
with "!remote->fetch[0].pattern", which is what we're really checking, 
anyway.

(If this is the first refspec we're on, and we don't have a per-branch 
config, and we got a match, and the refspec isn't a pattern, merge it; 
anything that matches according to get_fetch_map is a satisfactory match, 
even if it doesn't look quite the same.)

I'll do up an actual patch after dinner if nobody beats me to it.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help