From: SZEDER Gábor Date: Fri, 25 Mar 2016 14:58:05 GMT Subject: Re: parse-options does not recognize "unspecified" behavior Message-ID: <20160325155805.Horde.IaS9Rdqv5fu6BmOZCj5ulLW@webmail.informatik.kit.edu> In-Reply-To: Quoting Pranit Bauva : > On Sat, Mar 19, 2016 at 4:55 PM, SZEDER Gábor wrote: >>> 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. > >> >> 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. Deprecating doesn't mean "removing". It merely means that we add a note to the documentation stating that the option in question is deprecated, but we will keep supporting it for several years and releases to come. This means that '--verbose' and '--show-diff' must coexist for quite a while, and 'git commit' should do the right thing even if both old and new options are combined. And, of course, in combination with the new config variable(s). I suspect that all this would be more than a half an hour job.