git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Stefan Beller <sbeller@google.com>,
	Pranit Bauva <pranit.bauva@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: parse-options does not recognize "unspecified" behavior
Date: Thu, 17 Mar 2016 01:40:47 -0400	[thread overview]
Message-ID: <20160317054047.GA3457@sigill.intra.peff.net> (raw)
In-Reply-To: <CAPig+cSmQpt3u+1PPFD6CP9TF58R6NR=KCgC1dik9U=deaeCkA@mail.gmail.com>

On Thu, Mar 17, 2016 at 01:32:41AM -0400, Eric Sunshine wrote:

> On Wed, Mar 16, 2016 at 9:43 PM, Jeff King <peff@peff.net> wrote:
> > Arguably cmd_commit() should be using OPT_BOOL instead of OPT__VERBOSE,
> > as there is no such thing as "verbose > 1" here. But I don't think there
> > is any real user-facing consequence of that (however, given Eric's
> > suggestion, I suspect it would make Pranit's problem just go away, as it
> > assigns rather than increments; IOW, it does the thing Eric was
> > suggestion OPT__VERBOSE to do).
> 
> Actually, Pranit's previous version of the patch did treat verbosity
> as a boolean, but then SZEDER pointed out this bit from
> git-commit.txt:
> 
>     --verbose::
>         ...
>         If specified twice, show in addition the unified diff between
>         what would be committed and the worktree files, i.e. the unstaged
>         changes to tracked files.
> 
> which is what led us to the current discussion about wanting an
> "unspecified" value for OPT__VERBOSE.

Ah, thanks. I looked for something like that in builtin/commit.c and
didn't see us using verbose as anything but a boolean. But we pass it
into wt_status, which does look at "s->verbose > 1".

Sorry for the noise (and probably I should stop participating in this
discussion without having read all of the backstory!).

-Peff

  reply	other threads:[~2016-03-17  5:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 19:51 parse-options does not recognize "unspecified" behavior Pranit Bauva
2016-03-16 20:49 ` Jeff King
2016-03-16 21:06   ` Pranit Bauva
2016-03-16 21:23     ` Jeff King
2016-03-16 21:37       ` Eric Sunshine
2016-03-16 21:41         ` Pranit Bauva
2016-03-16 21:44         ` Jeff King
2016-03-16 21:53           ` Stefan Beller
2016-03-16 23:16             ` Jeff King
2016-03-16 23:33               ` Stefan Beller
2016-03-17  1:43                 ` Jeff King
2016-03-17  5:32                   ` Eric Sunshine
2016-03-17  5:40                     ` Jeff King [this message]
2016-03-19 11:25                   ` SZEDER Gábor
2016-03-19 16:55                     ` Pranit Bauva
2016-03-25 14:58                       ` SZEDER Gábor
2016-03-25 15:03                         ` Pranit Bauva
2016-03-16 21:37       ` Pranit Bauva

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160317054047.GA3457@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=pranit.bauva@gmail.com \
    --cc=sbeller@google.com \
    --cc=sunshine@sunshineco.com \
    /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.
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 NNTP newsgroup(s).