Quoting r. Junio C Hamano <junkio@xxxxxxx>: > Subject: Re: Multiple pulls from the same branch in .git/remotes/origin > > "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxx> 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 - : 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