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

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

 



Ilari Liusvaara <ilari.liusvaara@xxxxxxxxxxx> wrote:
> 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...

> @@ -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;
...
> +	/* 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.
--
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]