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

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

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
May 6, 2007, 13:53 UTC
Message-ID
<20070506135306.GB942MdfPADPa@greensroom.kotnet.org>
In-Reply-To
<7virb6fnkv.fsf@assigned-by-dhcp.cox.net>
On Sat, May 05, 2007 at 11:55:28PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> 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.

Show 5 quoted lines
> > +	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.
Show 6 quoted lines
> > +#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
Previous: Junio C HamanoNext: Sven Verdoolaege
Message 7 of 8 in “Initial support for cloning submodules”
  1. Sven VerdoolaegeMay 4, 2007
  2. Add dump-configSven Verdoolaege, May 4, 2007
  3. git-config: add --remote option for reading config from remote repoSven Verdoolaege, May 4, 2007
  4. http.h: make fill_active_slots a function pointerSven Verdoolaege, May 4, 2007
  5. git-config: read remote config files over HTTPSven Verdoolaege, May 4, 2007
  6. Junio C HamanoMay 6, 2007
  7. Sven VerdoolaegeMay 6, 2007
  8. git-clone: add --submodules for cloning submodulesSven Verdoolaege, May 4, 2007

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.