Subject: Re: [PATCH v2 3/8] status: support --porcelain[=<version>]

From: Jakub Narębski <[email-masked]>
Date: Mon, 25 Jul 2016 21:51:59 +0200

W dniu 2016-07-25 o 21:25, Jeff Hostetler pisze:
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -144,6 +144,21 @@ static struct strbuf message = STRBUF_INIT;
>  
>  static enum wt_status_format status_format = STATUS_FORMAT_UNSPECIFIED;
>  
> +static int opt_parse_porcelain(const struct option *opt, const char *arg, int unset)
> +{
> +	enum wt_status_format *value = (enum wt_status_format *)opt->value;
> +	if (unset)
> +		*value = STATUS_FORMAT_NONE;
> +	else if (!arg)
> +		*value = STATUS_FORMAT_PORCELAIN;
> +	else if (!strcmp(arg, "v1"))
> +		*value = STATUS_FORMAT_PORCELAIN;
> +	else
> +		die("unsupported porcelain version");
> +
> +	return 0;
> +}

Presumably it is not something hard to find, but perhaps it
would be better to print the version that were given (for
example "1" instead of "v1")?

-- 
Jakub Narębski