Re: [REROLL PATCH 2/8] Support mandatory capabilities

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

 



Ilari Liusvaara <ilari.liusvaara@xxxxxxxxxxx> writes:

> diff --git a/transport-helper.c b/transport-helper.c
> index a721dc2..f977d28 100644
> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -93,25 +93,39 @@ static struct child_process *get_helper(struct transport *transport)
>  
>  	data->out = xfdopen(helper->out, "r");
>  	while (1) {
> +		const char *capname;
> +		int mandatory = 0;
>  		recvline(data, &buf);
> ...
> +		} else if (mandatory) {
> +			fflush(stderr);
> +			die("Unknown madatory capability %s. This remote "
> +			    "helper probably needs newer version of Git.\n",
> +			    capname);

Why fflush() here?  Is the reason for needing to flush stderr before
letting die() to write into it very specific to this codepath, or shared
among other callers of die()?  I am wondering if we should add this
fflush() to report() in usage.c instead.
--
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]