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

Re: Strangely broken git repo

From
NHNick Hengeveld <nickh@reactrix.com>
Date
Oct 12, 2005, 03:26 UTC
Message-ID
<20051012032646.GA14819@reactrix.com>
In-Reply-To
<7v4q7p927d.fsf@assigned-by-dhcp.cox.net>
On Mon, Oct 10, 2005 at 02:00:06AM -0700, Junio C Hamano wrote:
> The fetch_alternates() function was supposed to be call-once and
> we have a static variable got_alternates that becomes 1 when it
> runs for the first time.  However, there are other 'return 0's
> introduced that does not set got_alternates to 1.
Oops, thanks for catching that - I'll fix it.
Show 11 quoted lines
> I am wondering if the semantics has changed that now we chain
> the alternates?  Initially, if we are cloning/fetching from
> repository A, which borrows from repository B (i.e. alternates
> we retrieve from A would name B), and if B in turn borrows from
> C, then we assumed that A's alternates would also name C, and
> that was the reason why fetch_alternates() was call-once
> function.  I do not mind if we change it to chain the alternates
> file, but if that is the case we should move the got_alternates
> variable into "struct alt_base", and pass the struct, not just
> alt->base, to fetch_alternates(), like this (untested, of
> course):

I'd thought about chaining the alternates, but wasn't sure whether it's safe to consider all alternates in the chain equivalent. I would want to implement fetching the chain such that it could happen parallel to other request and not block the pull. I think it would also be useful to track the network performance of each alternate and prefer faster sources as new requests are started.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
Previous: Matthias UrlichsNext: Junio C Hamano
Message 20 of 21 in “Strangely broken git repo”
  1. Martin Langhoff (CatalystIT)Oct 10, 2005
  2. Junio C HamanoOct 10, 2005
  3. Linus TorvaldsOct 10, 2005
  4. Linus TorvaldsOct 10, 2005
  5. Morten WelinderOct 10, 2005
  6. Linus TorvaldsOct 10, 2005
  7. Johannes SchindelinOct 10, 2005
  8. Quote reference names while fetching with curl.Junio C Hamano, Oct 11, 2005
  9. git-fetch --tags: deal with tags with spaces in them.Junio C Hamano, Oct 11, 2005
  10. Junio C HamanoOct 11, 2005
  11. Junio C HamanoOct 12, 2005
  12. Petr BaudisOct 12, 2005
  13. H. Peter AnvinOct 12, 2005
  14. H. Peter AnvinOct 12, 2005
  15. Junio C HamanoOct 12, 2005
  16. Junio C HamanoOct 12, 2005
  17. git-check-ref-format: reject funny ref names.Junio C Hamano, Oct 12, 2005
  18. Refuse to create funny refs in clone-pack, git-fetch and receive-pack.Junio C Hamano, Oct 12, 2005
  19. Matthias UrlichsOct 11, 2005
  20. Nick HengeveldOct 12, 2005
  21. Junio C HamanoOct 12, 2005

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.