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

Re: [PATCH 2/4] fetch: try mirrors if selected

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 26, 2009, 01:20 UTC
Message-ID
<20091126012022.GP11919@spearce.org>
In-Reply-To
<1259143617-26580-3-git-send-email-sam@vilain.net>
Sam Vilain <sam@vilain.net> wrote:
Show 7 quoted lines
> diff --git a/builtin-fetch.c b/builtin-fetch.c
> index 209f502..b3b8766 100644
> @@ -109,6 +109,109 @@ static void find_non_local_tags(struct transport *transport,
>  			struct ref **head,
>  			struct ref ***tail);
>  
> +char* get_url_hostname(const char *url)

Minor nit, but we mark any function not used outside of the module as static. Especially in a builtin-*.c since they all link into the same namespace. If this is meant to be reused, it belongs in connect.c most likely, that's where we already have code like this to get the SSH hostname out of a URL for SSH connections.

I don't have time right now to read the rest of this series, but the general approach of fetching to a temporary mirror space before checking if you really are current is a good one.

I'm not sure that storing the list of mirrors inside of the remote makes much sense, I would think the user would want to store only a handful of "fast" URLs.

And even then I wonder why this can't just be the url[1]..url[n-1] entries in the configuration file. push pushes to all of the URLs at once, "seeding the mirrors". Why can't fetch use the same configuration?

-- 
Shawn.
Previous: Sam VilainNext: Shawn O. Pearce
Message 6 of 8 in “Client-side mirroring patches (v0)”
  1. Sam VilainNov 25, 2009
  2. 1/4 remote: allow mirroring to be specified, and document settingsSam Vilain, Nov 25, 2009
  3. 2/4 fetch: try mirrors if selectedSam Vilain, Nov 25, 2009
  4. 3/4 fetch --use-mirror: don't fetch with 'autotags' for actual fetchSam Vilain, Nov 25, 2009
  5. 4/4 fetch: cleanup refs with --use-mirrorSam Vilain, Nov 25, 2009
  6. Shawn O. PearceNov 26, 2009
  7. Shawn O. PearceNov 26, 2009
  8. Nanako ShiraishiJan 1, 2010

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.