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

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

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Sep 28, 2007, 21:38 UTC
Message-ID
<Pine.LNX.4.64.0709281728310.5926@iabervon.org>
In-Reply-To
<7vps02o55q.fsf@gitster.siamese.dyndns.org>
On Fri, 28 Sep 2007, Junio C Hamano wrote:
Show 35 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Daniel Barkalow <barkalow@iabervon.org> writes:
> >
> >> 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*
Previous: Junio C Hamano
Message 9 of 9 in “Merge non-first refs that match first refspec”
  1. Merge non-first refs that match first refspecDaniel Barkalow, Sep 28, 2007
  2. Shawn O. PearceSep 28, 2007
  3. Daniel BarkalowSep 28, 2007
  4. Shawn O. PearceSep 28, 2007
  5. Daniel BarkalowSep 28, 2007
  6. Shawn O. PearceSep 28, 2007
  7. Junio C HamanoSep 28, 2007
  8. Junio C HamanoSep 28, 2007
  9. Daniel BarkalowSep 28, 2007

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.