git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Verdoolaege <skimo@kotnet.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-config: read remote config files over HTTP
Date: Sun, 06 May 2007 15:53:06 +0200	[thread overview]
Message-ID: <20070506135306.GB942MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <7virb6fnkv.fsf@assigned-by-dhcp.cox.net>

On Sat, May 05, 2007 at 11:55:28PM -0700, Junio C Hamano wrote:
> Sven Verdoolaege <skimo@liacs.nl> writes:
> > +static int config_from_http(config_fn_t fn, char *dest)
> > +{
> > +	static char *config_temp = "config.temp";
> > +	if (git_http_fetch_config(dest, config_temp))
> > +		return 1;
> > +	git_config_from_file(fn, config_temp);
> > +	unlink(config_temp);
> > +	return 0;
> > +}
> 
> Not mkstemp()?

I more or less copy-pasted the way "index" is handled now.
I'll use mkstemp in the next round.

> > +	if (!prefixcmp(dest, "http://"))
> > +		return config_from_http(fn, dest);
> > +
> 
> Shouldn't this also work for other protocols we handle via curl?

I don't think I copied the required setup for https, but ftp should work.

> > +#ifdef USE_CURL_MULTI
> > +void (*fill_active_slots)(void) = NULL;
> > +#endif
> > +
> 
> I wonder if we could lose USE_CURL_MULTI around this one,...

I wondered about that too, but I wanted to make my changes as minimal
as possible.  I'll drop the #ifdef in the next round.

skimo

  reply	other threads:[~2007-05-06 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04 10:49 Initial support for cloning submodules Sven Verdoolaege
2007-05-04 10:49 ` [PATCH] Add dump-config Sven Verdoolaege
2007-05-04 10:49 ` [PATCH] git-config: add --remote option for reading config from remote repo Sven Verdoolaege
2007-05-04 10:49 ` [PATCH] http.h: make fill_active_slots a function pointer Sven Verdoolaege
2007-05-04 10:49 ` [PATCH] git-config: read remote config files over HTTP Sven Verdoolaege
2007-05-06  6:55   ` Junio C Hamano
2007-05-06 13:53     ` Sven Verdoolaege [this message]
2007-05-04 10:49 ` [PATCH] git-clone: add --submodules for cloning submodules Sven Verdoolaege

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=20070506135306.GB942MdfPADPa@greensroom.kotnet.org \
    --to=skimo@kotnet.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=skimo@liacs.nl \
    /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;
as well as URLs for NNTP newsgroup(s).