From: Michael S. Tsirkin Date: Mon, 07 Aug 2006 22:33:15 GMT Subject: Re: Multiple pulls from the same branch in .git/remotes/origin Message-ID: <20060807223315.GB24393@mellanox.co.il> In-Reply-To: <7vzmegyzgb.fsf@assigned-by-dhcp.cox.net> Quoting r. Junio C Hamano : > Subject: Re: Multiple pulls from the same branch in .git/remotes/origin > > "Michael S. Tsirkin" writes: > > > It seems that have to make path_match in connect.c return an array > > of indexes for that to work. Right? > > I do not recall why Linus placed that "*s = 0" in there. That > is the one that makes the same ref not match more than once. Hmm, as I read it, this marks the *match* as already found. This seems to be what makes the sanity check in main work: /* If the heads to pull were given, we should have * consumed all of them by matching the remote. * Otherwise, 'git-fetch remote no-such-ref' would * silently succeed without issuing an error. */ What stops it is return i + 1 in path_match, no? I think the issue is that path_match will stop at first match and not label multiple matches, so later sanity check in main errors out. > It _could_ be that the fix is just the matter of removing that > line, but it may have interesting consequences; I dunno offhand. > > What I did is just scan the full list of refspecs instead of breaking out at the first match. -- MST