git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v8 1/2] parse-options.c: make OPTION__COUNTUP consider negative values

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
Mar 19, 2016, 04:55 UTC
Message-ID
<CAFZEwPNkWYC4nj6bjQd+HYxSVjm_UQwGF5UQwOxziA8K6iuszg@mail.gmail.com>
In-Reply-To
<xmqq4mc3pf3y.fsf@gitster.mtv.corp.google.com>
On Sat, Mar 19, 2016 at 4:29 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 26 quoted lines
> Pranit Bauva <pranit.bauva@gmail.com> writes:
>
>> The reason to make it consider negative values or more specifically
>> "unspecified" values is to give the ability to differentiate between
>> once, multiple time or with --no-option.
>>
>> Eg. :
>> initialize verbose = -1
>> `git commit` => verbose = -1
>> `git commit -v` => verbose = 1
>> `git commit -v -v` => verbose = 2
>> `git commit --no-verbose` => verbose = 0
>
> A few more things I noticed about this are:
>
>  - Many uses of COUNTUP has now been replaced with BOOL and what
>    remains are verbose/quiet/force.
>
>  - This change will not affect existing users of COUNTUP at all, as
>    long as they use the initial value of 0 (or more), as there is no
>    mechanism to decrement.  The only thing the command line can do
>    is to reset it to zero with "--no-foo".
>
> So it seems a safe and sensible change.  Even though I suspect that
> the justification can be written more clearly, I am not sure if it
> worth the extra effort.

I can include this paragraph. Some people might have a bit difficulty in knowing the importance as they might not have followed my earlier patches. To bridge this gap, I can include your paragraph in the commit message. Any other particular things you want me to justify? I will be glad to send another re-roll of this.

Regards, Pranit Bauva

Previous: Junio C Hamano
Message 11 of 11 in “parse-options.c: make OPTION__COUNTUP consider negative values”
  1. 1/2 parse-options.c: make OPTION__COUNTUP consider negative valuesPranit Bauva, Mar 18, 2016
  2. 2/2 commit: add a commit.verbose config variablePranit Bauva, Mar 18, 2016
  3. Eric SunshineMar 20, 2016
  4. Pranit BauvaMar 20, 2016
  5. Eric SunshineMar 20, 2016
  6. Pranit BauvaMar 20, 2016
  7. Junio C HamanoMar 23, 2016
  8. Pranit BauvaMar 23, 2016
  9. Junio C HamanoMar 23, 2016
  10. Junio C HamanoMar 18, 2016
  11. Pranit BauvaMar 19, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.