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

Re: [PATCH v12 2/5] test-parse-options: print quiet as integer

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
Apr 5, 2016, 15:39 UTC
Message-ID
<CAFZEwPORAer3=WmUqqhztv4kAOHdv+yB12tRyUYh_YTSmtcQsQ@mail.gmail.com>
In-Reply-To
<CAPig+cQpdr7A7GxKUN3tDs2rQ7z_S5b1WVsk01=BwkCwB2mp0A@mail.gmail.com>
[+cc:Duy Nguyen, Jonathan Nieder]
On Mon, Apr 4, 2016 at 3:00 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 8 quoted lines
> On Sat, Apr 2, 2016 at 7:33 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:
>> Current implementation of parse-options.c treats OPT__QUIET() as integer
>> and not boolean and thus it is more appropriate to print it as integer
>> to avoid confusion.
>
> I can buy this line of reasoning, however, it would be even easier to
> sell the change if you cited an existing client (a git command) which
> actually respects multiple quiet levels. Are there any?

I investigated into this. But I was unable to find any git commit which actually respects mulitple quiet levels. I first did a 'git grep OPT__QUIET' to find the commands which use this. Then I went through the documentation which covers it. None of them have any such mention of multiple quiet levels. But still I dug further and and went through all the individual source files. I followed the corresponding C source code for the header file included and also searched there for any trace of quiet. But I still didn't find any such use of multiple quiet levels. I have found that the commit id 212c0a6f (Duy Ngyuyen; 7 Dec, 2013; parse-options: remove OPT__BOOLEAN). Maybe he has something to say as to why this was introduced and OPT__QUIET which previously used OPT__BOOLEAN, now uses OPT_COUNTUP rather than OPT_BOOL. This commit In fact git-repack command has quiet but this is not mentioned in the documentation. If someone could include this it in the documentation. I would do it but I am not quite familiar with git-repack and haven't really used it anytime.

Show 6 quoted lines
> More importantly, though, this change implies that you should also add
> tests to ensure that the quiet level is indeed incremented with each
> --quiet, just as "-vv" and "--verbose --verbose" are already tested.
> You might be able to include such new tests directly in this patch as
> long as the commit message is clear about it, or add them in a
> separate patch.
I will include the tests for multiple level of quiet in the patch.
> By the way, I don't see any tests to ensure that --no-verbose and
> --no-quiet reset those respective values to 0. A separate patch which
> adds such tests would be nice (unless such tests already exist and I
> merely missed them).

There are no tests to ensure that --no-verbose and --no-quiet reset those respective values to 0 just before this patch. But I have covered the --no-verbose tests in the upcoming patch 3/5. I will include the tests for --no-quiet in this patch.

Previous: Eric SunshineNext: Eric Sunshine
Message 7 of 36 in “t0040-test-parse-options.sh: fix style issues”
  1. 1/5 t0040-test-parse-options.sh: fix style issuesPranit Bauva, Apr 2, 2016
  2. 3/5 parse-options.c: make OPTION_COUNTUP respect "unspecified" valuesPranit Bauva, Apr 2, 2016
  3. Eric SunshineApr 3, 2016
  4. Pranit BauvaApr 5, 2016
  5. 2/5 test-parse-options: print quiet as integerPranit Bauva, Apr 2, 2016
  6. Eric SunshineApr 3, 2016
  7. Pranit BauvaApr 5, 2016
  8. Eric SunshineApr 6, 2016
  9. Duy NguyenApr 8, 2016
  10. Junio C HamanoApr 8, 2016
  11. 4/5 t7507-commit-verbose: improve test coverage by testing number of diffsPranit Bauva, Apr 2, 2016
  12. Eric SunshineApr 4, 2016
  13. Eric SunshineApr 4, 2016
  14. Pranit BauvaApr 5, 2016
  15. 5/5 commit: add a commit.verbose config variablePranit Bauva, Apr 2, 2016
  16. Eric SunshineApr 4, 2016
  17. Eric SunshineApr 4, 2016
  18. Pranit BauvaApr 5, 2016
  19. Eric SunshineApr 3, 2016
  20. Pranit BauvaApr 4, 2016
  21. Eric SunshineApr 4, 2016
  22. Pranit BauvaApr 5, 2016
  23. 1/6 t0040-test-parse-options.sh: fix style issuesPranit Bauva, Apr 9, 2016
  24. 6/6 commit: add a commit.verbose config variablePranit Bauva, Apr 9, 2016
  25. Junio C HamanoApr 12, 2016
  26. Pranit BauvaApr 12, 2016
  27. Junio C HamanoApr 12, 2016
  28. Junio C HamanoApr 12, 2016
  29. Pranit BauvaApr 12, 2016
  30. 5/6 t7507-commit-verbose: improve test coverage by testing number of diffsPranit Bauva, Apr 9, 2016
  31. 2/6 test-parse-options: print quiet as integerPranit Bauva, Apr 9, 2016
  32. Junio C HamanoApr 12, 2016
  33. Pranit BauvaApr 12, 2016
  34. Junio C HamanoApr 12, 2016
  35. 3/6 t0040-parse-options: improve test coveragePranit Bauva, Apr 9, 2016
  36. 4/6 parse-options.c: make OPTION_COUNTUP respect "unspecified" valuesPranit Bauva, Apr 9, 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.