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

Re: [RFC PATCH v2 1/8] Pass unknown protocols to external protocol handlers

From
Shawn O. Pearce <spearce@spearce.org>
Date
Dec 4, 2009, 17:55 UTC
Message-ID
<20091204175545.GC1483@spearce.org>
In-Reply-To
<1259942168-24869-4-git-send-email-ilari.liusvaara@elisanet.fi>
Ilari Liusvaara <ilari.liusvaara@elisanet.fi> wrote:
Show 5 quoted lines
> Change URL handling to allow external protocol handlers to implement
> new protocols without the '::' syntax if helper name does not conflict
> with any built-in protocol.
> 
> foo:// now invokes git-remote-foo with foo:// URL.
...
Uh, great, but...
Show 8 quoted lines
> @@ -30,6 +50,7 @@ static struct child_process *get_helper(struct transport *transport)
>  	const char **refspecs = NULL;
>  	int refspec_nr = 0;
>  	int refspec_alloc = 0;
> +	int duped;
>  
>  	if (data->helper)
>  		return data->helper;
...
Show 12 quoted lines
> +	/* Open the output as FILE* so strbuf_getline() can be used.
> +	   Do this with duped fd because fclose() will close the fd,
> +	   and stuff like disowning will require the fd to remain.
> +
> +	   Set the stream to unbuffered because some reads are critical
> +	   in sense that any overreading will cause deadlocks.
> +	*/
> +	if((duped = dup(helper->out)) < 0)
> +		die_errno("Can't dup helper output fd");
> +	data->out = xfdopen(duped, "r");
> +	setvbuf(data->out, NULL, _IONBF, 0);
> +

This is an entirely unrelated change. Please split it into its own commit so its easier to review, test, blah blah blah.

-- 
Shawn.
Previous: Sverre RabbelierNext: Ilari Liusvaara
Message 6 of 20 in “Remote helpers smart transport extensions”
  1. 0/8 Remote helpers smart transport extensionsIlari Liusvaara, Dec 4, 2009
  2. 0/8 Remote helpers smart transport extensionsIlari Liusvaara, Dec 4, 2009
  3. 0/8 Remote helpers smart transport extensionsIlari Liusvaara, Dec 4, 2009
  4. 1/8 Pass unknown protocols to external protocol handlersIlari Liusvaara, Dec 4, 2009
  5. Sverre RabbelierDec 4, 2009
  6. Shawn O. PearceDec 4, 2009
  7. Ilari LiusvaaraDec 5, 2009
  8. 2/8 Refactor git transport options parsingIlari Liusvaara, Dec 4, 2009
  9. 3/8 Support taking over transportsIlari Liusvaara, Dec 4, 2009
  10. Shawn O. PearceDec 4, 2009
  11. Ilari LiusvaaraDec 5, 2009
  12. 4/8 Support remote helpers implementing smart transportsIlari Liusvaara, Dec 4, 2009
  13. Shawn O. PearceDec 4, 2009
  14. Ilari LiusvaaraDec 5, 2009
  15. 5/8 Support remote archive from external protocol helpersIlari Liusvaara, Dec 4, 2009
  16. 6/8 Remove special casing of http, https and ftpIlari Liusvaara, Dec 4, 2009
  17. Sverre RabbelierDec 4, 2009
  18. 7/8 Add remote helper debug modeIlari Liusvaara, Dec 4, 2009
  19. Sverre RabbelierDec 4, 2009
  20. 8/8 Support mandatory capabilitiesIlari Liusvaara, Dec 4, 2009

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.