Thread (18 messages) flat view 18 messages, 5 authors, 2016-06-15

Re: parse-options does not recognize "unspecified" behavior

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:08:46

On Wed, Mar 16, 2016 at 9:43 PM, Jeff King [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help