From: "Jakub Narębski" <jnareb@gmail.com>
To: Jeff Hostetler <jeffhost@microsoft.com>, git@vger.kernel.org
Cc: git@jeffhostetler.com, peff@peff.net, gitster@pobox.com,
Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v2 3/8] status: support --porcelain[=<version>]
Date: Mon, 25 Jul 2016 21:51:59 +0200 [thread overview]
Message-ID: <57966DDF.5020301@gmail.com> (raw)
In-Reply-To: <1469474750-49075-4-git-send-email-jeffhost@microsoft.com>
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
next prev parent reply other threads:[~2016-07-25 19:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-25 19:25 [PATCH v2 0/8] status: V2 porcelain status Jeff Hostetler
2016-07-25 19:25 ` [PATCH v2 1/8] status: rename long-format print routines Jeff Hostetler
2016-07-25 19:25 ` [PATCH v2 2/8] status: cleanup API to wt_status_print Jeff Hostetler
2016-07-25 20:05 ` Junio C Hamano
2016-07-25 19:25 ` [PATCH v2 3/8] status: support --porcelain[=<version>] Jeff Hostetler
2016-07-25 19:51 ` Jakub Narębski [this message]
2016-07-25 19:25 ` [PATCH v2 4/8] status: per-file data collection for --porcelain=v2 Jeff Hostetler
2016-07-25 20:14 ` Junio C Hamano
2016-07-26 13:31 ` Jeff Hostetler
2016-07-25 19:25 ` [PATCH v2 5/8] status: print per-file porcelain v2 status data Jeff Hostetler
2016-07-25 20:23 ` Junio C Hamano
2016-07-26 13:53 ` Jeff Hostetler
2016-07-25 19:25 ` [PATCH v2 6/8] status: print branch info with --porcelain=v2 --branch Jeff Hostetler
2016-07-25 20:30 ` Junio C Hamano
2016-07-25 19:25 ` [PATCH v2 7/8] status: update git-status.txt for --porcelain=v2 Jeff Hostetler
2016-07-25 22:43 ` Jakub Narębski
2016-07-26 15:34 ` Johannes Schindelin
2016-07-26 19:42 ` Jeff Hostetler
2016-07-25 19:25 ` [PATCH v2 8/8] status: tests " Jeff Hostetler
2016-07-26 16:07 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57966DDF.5020301@gmail.com \
--to=jnareb@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).