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

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

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
Mar 19, 2016, 16:55 UTC
Message-ID
<CAFZEwPNK+XTjXzjn-Pv3iP4XiajXrdhUHWLz-8c0Ssy_Edkd7A@mail.gmail.com>
In-Reply-To
<1458386735-8038-1-git-send-email-szeder@ira.uka.de>
On Sat, Mar 19, 2016 at 4:55 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:
Show 22 quoted lines
>> Yes, I think in general, "-v" and "-q" should work as opposites. But
>> that is not the case with commit, where "-v" and "-q" operate on totally
>> separate messages. I think that is a UX mistake, and we would not do
>> it that way if designing from scratch. But we're stuck with it for
>> historical reasons (I'd probably name "--verbose" as "--show-diff" or
>> something if writing it today).
>
> Yeah, as a long-time 'git commit -v' user I never really thought about
> the name of the option, but when I pointed out the multiple verbose
> levels it struck me as a rather unfortunate name for this feature,
> too.  Oh, well, we are stuck with it indeed.
>
> However, that doesn't mean that we have to spread this badly chosen
> name from options to config variables, does it?  I think that if we
> are going to define a new config variable today, then it should be
> named properly, and it's better not to call it 'commit.verbose', but
> 'commit.showDiff' or something.  Perhaps we could even define two new
> config variables: 'commit.showDiff' for the diff of the changes to be
> committed (= '-v'), and 'commit.showUnstagedDiff' for the - wait for
> it! - unstaged changes (= '-v -v').  Not sure about the variable
> names, though, because "plain" 'git diff' shows unstaged changes,
> while 'git diff --cached' shows staged changes.
This seems a better way to go about.
Show 5 quoted lines
>
> Furthermore, it doesn't mean that we can't add properly named command
> line option(s) and state that '-v|--verbose' is a synonym to
> '--show-diff' (maybe even deprecate '--verbose'), but I don't want to
> squeeze even more into a GSOC micro project.

Its perfectly fine. It hardly a half an hour job. Though I like the idea that we should use both "-v|--verbose" and "--show-diff" instead of deprecating it. Plus, this edit would not be required. What are your suggestions?

Regards, Pranit Bauva

Previous: SZEDER GáborNext: SZEDER Gábor
Message 15 of 18 in “parse-options does not recognize "unspecified" behavior”
  1. Pranit BauvaMar 16, 2016
  2. Jeff KingMar 16, 2016
  3. Pranit BauvaMar 16, 2016
  4. Jeff KingMar 16, 2016
  5. Eric SunshineMar 16, 2016
  6. Pranit BauvaMar 16, 2016
  7. Jeff KingMar 16, 2016
  8. Stefan BellerMar 16, 2016
  9. Jeff KingMar 16, 2016
  10. Stefan BellerMar 16, 2016
  11. Jeff KingMar 17, 2016
  12. Eric SunshineMar 17, 2016
  13. Jeff KingMar 17, 2016
  14. SZEDER GáborMar 19, 2016
  15. Pranit BauvaMar 19, 2016
  16. SZEDER GáborMar 25, 2016
  17. Pranit BauvaMar 25, 2016
  18. Pranit BauvaMar 16, 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.