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
Junio C Hamano <junkio@cox.net>
Date
Aug 7, 2006, 18:28 UTC
Message-ID
<7vd5bc4czr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060807125116.GA28658@mellanox.co.il>
"Michael S. Tsirkin" <mst@mellanox.co.il> writes:
> I get remote linus_master properly fetched into local origin.
> Two questions:
> 1. Isn't is possible to pull from the same remote branch into multiple local
>    branches?

Currently, no. The underlying git-fetch-pack makes sure you do not give the same branches twice on the command line. I think what the code actually tries to do is to make sure each of the given refspecs is not ambiguous and matches something, but while doing so it marks the remote ref that matched ineligible to match again, which ends up showing the error message you saw.

It might not be too difficult to change it though. This part of the code is relatively old and I do not remember the details offhand, other than I remember that the first time I saw it I had the same confused "Huh? we do not let a ref fetched twice?" reaction ;-).

Previous: Michael S. TsirkinNext: Michael S. Tsirkin
Message 5 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.