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

Re: Multiple pulls from the same branch in .git/remotes/origin

From
MTMichael S. Tsirkin <mst@mellanox.co.il>
Date
Aug 7, 2006, 22:33 UTC
Message-ID
<20060807223315.GB24393@mellanox.co.il>
In-Reply-To
<7vzmegyzgb.fsf@assigned-by-dhcp.cox.net>
Quoting r. Junio C Hamano <junkio@cox.net>:
Show 9 quoted lines
> Subject: Re: Multiple pulls from the same branch in .git/remotes/origin
> 
> "Michael S. Tsirkin" <mst@mellanox.co.il> 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
Previous: Junio C HamanoNext: Michael S. Tsirkin
Message 10 of 27 in “mailinfo: accept >From in message header”
  1. mailinfo: accept >From in message headerMichael S. Tsirkin, Jul 27, 2006
  2. Junio C HamanoJul 27, 2006
  3. Michael S. TsirkinJul 27, 2006
  4. Multiple pulls from the same branch in .git/remotes/originMichael S. Tsirkin, Aug 7, 2006
  5. Junio C HamanoAug 7, 2006
  6. Michael S. TsirkinAug 7, 2006
  7. Junio C HamanoAug 7, 2006
  8. Michael S. TsirkinAug 7, 2006
  9. Junio C HamanoAug 7, 2006
  10. Michael S. TsirkinAug 7, 2006
  11. Multiple refs from the same remote in one git fetchMichael S. Tsirkin, Aug 7, 2006
  12. Junio C HamanoAug 7, 2006
  13. Michael S. TsirkinAug 12, 2006
  14. Junio C HamanoAug 12, 2006
  15. Michael S. TsirkinAug 14, 2006
  16. Junio C HamanoAug 14, 2006
  17. Michael S. TsirkinAug 14, 2006
  18. Junio C HamanoAug 14, 2006
  19. Michael S. TsirkinAug 14, 2006
  20. Junio C HamanoAug 14, 2006
  21. Michael S. TsirkinAug 14, 2006
  22. Jakub NarebskiAug 14, 2006
  23. Michael S. TsirkinAug 14, 2006
  24. Jakub NarebskiAug 14, 2006
  25. Michael S. TsirkinAug 14, 2006
  26. Multiple refs from the same remote in one git fetchMichael S. Tsirkin, Aug 22, 2006
  27. Junio C HamanoAug 23, 2006

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.