Re: [PATCH] git-config: read remote config files over HTTP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 05, 2007 at 11:55:28PM -0700, Junio C Hamano wrote:
> Sven Verdoolaege <skimo@xxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]