Git development
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Sam Vilain <sam@vilain.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/4] fetch: try mirrors if selected
Date: Wed, 25 Nov 2009 17:20:22 -0800	[thread overview]
Message-ID: <20091126012022.GP11919@spearce.org> (raw)
In-Reply-To: <1259143617-26580-3-git-send-email-sam@vilain.net>

Sam Vilain <sam@vilain.net> wrote:
> 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.

  parent reply	other threads:[~2009-11-26  1:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 10:06 Client-side mirroring patches (v0) Sam Vilain
2009-11-25 10:06 ` [PATCH 1/4] remote: allow mirroring to be specified, and document settings Sam Vilain
2009-11-25 10:06   ` [PATCH 2/4] fetch: try mirrors if selected Sam Vilain
2009-11-25 10:06     ` [PATCH 3/4] fetch --use-mirror: don't fetch with 'autotags' for actual fetch Sam Vilain
2009-11-25 10:06       ` [PATCH 4/4] fetch: cleanup refs with --use-mirror Sam Vilain
2009-11-26  1:20     ` Shawn O. Pearce [this message]
2009-11-26  0:58 ` Client-side mirroring patches (v0) Shawn O. Pearce
2010-01-01  0:05 ` Nanako Shiraishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091126012022.GP11919@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=sam@vilain.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox