{"thread":{"id":"41686","subject":"[PATCH v7] commit: add a commit.verbose config variable","startedAt":"2016-03-14T21:38:19Z","lastAt":"2016-03-15T21:18:53Z","messageCount":9,"participants":["Pranit Bauva","SZEDER Gábor","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":7,"patchTotal":null},"messages":[{"id":"280749","messageId":"010201537710be08-f31428b3-5df3-4694-8c4a-0e8f058131b3-000000@eu-west-1.amazonses.com","threadId":"41686","inReplyTo":null,"subject":"[PATCH v7] commit: add a commit.verbose config variable","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-03-14T21:38:19Z","receivedAt":"2016-03-14T21:38:19Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Add commit.verbose configuration variable as a convenience for those\nwho always prefer --verbose.\n\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n\n---\nThe previous versions of this patch are:\n - [v6] $gmane/288811\n - [v5] $gmane/288728\n - [v4] $gmane/288652\n - [v3] $gmane/288634\n - [v2] $gmane/288569\n - [v1] $gmane/287540\n\nThe changes with respect to the last version are :\n - Add '-c commit.verbose true'\n\nIt is a mistake on my part. I was a bit sleepy.\n---\n Documentation/config.txt     |  4 ++++\n Documentation/git-commit.txt |  3 ++-\n builtin/commit.c             |  4 ++++\n t/t7507-commit-verbose.sh    | 29 +++++++++++++++++++++++++++++\n 4 files changed, 39 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 01cca0a..9b93f6c 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1110,6 +1110,10 @@ commit.template::\n \t\"`~/`\" is expanded to the value of `$HOME` and \"`~user/`\" to the\n \tspecified user's home directory.\n \n+commit.verbose::\n+\tA boolean to specify whether to always include the verbose option\n+\twith `git commit`. See linkgit:git-commit[1].\n+\n credential.helper::\n \tSpecify an external helper to be called when a username or\n \tpassword credential is needed; the helper may consult external\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 9ec6b3c..d474226 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -290,7 +290,8 @@ configuration variable documented in linkgit:git-config[1].\n \twhat changes the commit has.\n \tNote that this diff output doesn't have its\n \tlines prefixed with '#'. This diff will not be a part\n-\tof the commit message.\n+\tof the commit message. See the `commit.verbose` configuration\n+\tvariable in linkgit:git-config[1].\n +\n If specified twice, show in addition the unified diff between\n what would be committed and the worktree files, i.e. the unstaged\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex b3bd2d4..e0b96231 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1505,6 +1505,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \t\tsign_commit = git_config_bool(k, v) ? \"\" : NULL;\n \t\treturn 0;\n \t}\n+\tif (!strcmp(k, \"commit.verbose\")) {\n+\t\tverbose = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n \n \tstatus = git_gpg_config(k, v, NULL);\n \tif (status)\ndiff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\nindex 2ddf28c..5320f1e 100755\n--- a/t/t7507-commit-verbose.sh\n+++ b/t/t7507-commit-verbose.sh\n@@ -96,4 +96,33 @@ test_expect_success 'verbose diff is stripped out with set core.commentChar' '\n \ttest_i18ngrep \"Aborting commit due to empty commit message.\" err\n '\n \n+test_expect_success 'commit.verbose true and --verbose omitted' '\n+\tgit -c commit.verbose=true commit --amend\n+'\n+\n+test_expect_success 'commit.verbose true and --no-verbose' '\n+\ttest_must_fail git -c commit.verbose=true commit --amend --no-verbose\n+'\n+\n+test_expect_success 'commit.verbose false and --verbose' '\n+\tgit -c commit.verbose=false commit --amend --verbose\n+'\n+\n+test_expect_success 'commit.verbose false and --verbose omitted' '\n+\ttest_must_fail git -c commit.verbose=false commit --amend\n+'\n+\n+test_expect_success 'commit.verbose true and --verbose' '\n+\tgit -c commit.verbose=true commit --amend --verbose\n+'\n+\n+test_expect_success 'commit.verbose false and --no-verbose' '\n+\ttest_must_fail git -c commit.verbose=false commit --amend --no-verbose\n+'\n+\n+test_expect_success 'status ignores commit.verbose=true' '\n+\tgit -c commit.verbose=true status >actual &&\n+\t! grep \"^diff --git\" actual\n+'\n+\n test_done\n\n--\nhttps://github.com/git/git/pull/205\n"},{"id":"280774","messageId":"1458041486-7044-1-git-send-email-szeder@ira.uka.de","threadId":"41686","inReplyTo":"010201537710be08-f31428b3-5df3-4694-8c4a-0e8f058131b3-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2016-03-15T11:31:26Z","receivedAt":"2016-03-15T11:31:26Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"> Add commit.verbose configuration variable as a convenience for those\n> who always prefer --verbose.\n> \n> Helped-by: Eric Sunshine <sunshine@sunshineco.com>\n> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>\n> \n> ---\n> The previous versions of this patch are:\n>  - [v6] $gmane/288811\n>  - [v5] $gmane/288728\n>  - [v4] $gmane/288652\n>  - [v3] $gmane/288634\n>  - [v2] $gmane/288569\n>  - [v1] $gmane/287540\n> \n> The changes with respect to the last version are :\n>  - Add '-c commit.verbose true'\n> \n> It is a mistake on my part. I was a bit sleepy.\n> ---\n>  Documentation/config.txt     |  4 ++++\n>  Documentation/git-commit.txt |  3 ++-\n>  builtin/commit.c             |  4 ++++\n>  t/t7507-commit-verbose.sh    | 29 +++++++++++++++++++++++++++++\n>  4 files changed, 39 insertions(+), 1 deletion(-)\n> \n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 01cca0a..9b93f6c 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -1110,6 +1110,10 @@ commit.template::\n>  \t\"`~/`\" is expanded to the value of `$HOME` and \"`~user/`\" to the\n>  \tspecified user's home directory.\n>  \n> +commit.verbose::\n> +\tA boolean to specify whether to always include the verbose option\n> +\twith `git commit`. See linkgit:git-commit[1].\n> +\n\nYou made 'commit.verbose' a boolean, so either verbose or not, ...\n\n>  credential.helper::\n>  \tSpecify an external helper to be called when a username or\n>  \tpassword credential is needed; the helper may consult external\n> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\n> index 9ec6b3c..d474226 100644\n> --- a/Documentation/git-commit.txt\n> +++ b/Documentation/git-commit.txt\n> @@ -290,7 +290,8 @@ configuration variable documented in linkgit:git-config[1].\n>  \twhat changes the commit has.\n>  \tNote that this diff output doesn't have its\n>  \tlines prefixed with '#'. This diff will not be a part\n> -\tof the commit message.\n> +\tof the commit message. See the `commit.verbose` configuration\n> +\tvariable in linkgit:git-config[1].\n>  +\n>  If specified twice, show in addition the unified diff between\n>  what would be committed and the worktree files, i.e. the unstaged\n\n... but note these context lines telling us that --verbose can be\nspecified not just once but twice (and who knows what the future may\nbring).  This raises some not entirely rhetorical questions:\n\n  - What does 'git config commit.verbose true && git commit --verbose'\n    do?\n\n  - Should 'commit.verbose' only care about the convenience of those\n    who always prever '--verbose', or about those who like '-v -v',\n    too?\n\n  - If the latter, i.e. 'commit.verbose' should cater for '-v -v' as\n    well, then what should 'git config commit.verbose \"<verbose level\n    two>\" && git commit --verbose' do?\n\n> diff --git a/builtin/commit.c b/builtin/commit.c\n> index b3bd2d4..e0b96231 100644\n> --- a/builtin/commit.c\n> +++ b/builtin/commit.c\n> @@ -1505,6 +1505,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n>  \t\tsign_commit = git_config_bool(k, v) ? \"\" : NULL;\n>  \t\treturn 0;\n>  \t}\n> +\tif (!strcmp(k, \"commit.verbose\")) {\n> +\t\tverbose = git_config_bool(k, v);\n> +\t\treturn 0;\n> +\t}\n>  \n>  \tstatus = git_gpg_config(k, v, NULL);\n>  \tif (status)\n> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\n> index 2ddf28c..5320f1e 100755\n> --- a/t/t7507-commit-verbose.sh\n> +++ b/t/t7507-commit-verbose.sh\n> @@ -96,4 +96,33 @@ test_expect_success 'verbose diff is stripped out with set core.commentChar' '\n>  \ttest_i18ngrep \"Aborting commit due to empty commit message.\" err\n>  '\n>  \n> +test_expect_success 'commit.verbose true and --verbose omitted' '\n> +\tgit -c commit.verbose=true commit --amend\n> +'\n> +\n> +test_expect_success 'commit.verbose true and --no-verbose' '\n> +\ttest_must_fail git -c commit.verbose=true commit --amend --no-verbose\n> +'\n> +\n> +test_expect_success 'commit.verbose false and --verbose' '\n> +\tgit -c commit.verbose=false commit --amend --verbose\n> +'\n> +\n> +test_expect_success 'commit.verbose false and --verbose omitted' '\n> +\ttest_must_fail git -c commit.verbose=false commit --amend\n> +'\n> +\n> +test_expect_success 'commit.verbose true and --verbose' '\n> +\tgit -c commit.verbose=true commit --amend --verbose\n> +'\n> +\n> +test_expect_success 'commit.verbose false and --no-verbose' '\n> +\ttest_must_fail git -c commit.verbose=false commit --amend --no-verbose\n> +'\n> +\n> +test_expect_success 'status ignores commit.verbose=true' '\n> +\tgit -c commit.verbose=true status >actual &&\n> +\t! grep \"^diff --git\" actual\n> +'\n> +\n>  test_done\n> \n> --\n> https://github.com/git/git/pull/205\n"},{"id":"280818","messageId":"CAFZEwPNAVxT2HVQyj0Wajth_y-P6Af4AcSZDzJDJP=vLHztwiw@mail.gmail.com","threadId":"41686","inReplyTo":"1458041486-7044-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-03-15T19:00:09Z","receivedAt":"2016-03-15T19:00:09Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"On Tue, Mar 15, 2016 at 5:01 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:\n\n> You made 'commit.verbose' a boolean, so either verbose or not, ...\n> ... but note these context lines telling us that --verbose can be\n> specified not just once but twice (and who knows what the future may\n> bring).  This raises some not entirely rhetorical questions:\n>\n>   - What does 'git config commit.verbose true && git commit --verbose'\n>     do?\n\nThis is a nice thought which didn't strike me!\n\nAs Eric Sunshine mentioned ($gmane.org/288811), it would react\naccording to the multiple verbosity level and since its not currently\ndefined in `commit` it will react as it is reacting when verbosity\nlevel is 1.\n\nIf let's say we incorporate this behavior now, it can lead to\nconfusion for the user (not developer) as to whether `commit` supports\nmultiple verbosity.\n\n>   - Should 'commit.verbose' only care about the convenience of those\n>     who always prever '--verbose', or about those who like '-v -v',\n>     too?\n>\n>   - If the latter, i.e. 'commit.verbose' should cater for '-v -v' as\n>     well, then what should 'git config commit.verbose \"<verbose level\n>     two>\" && git commit --verbose' do?\n\nIf I was the user, I would use multiple levels of verbosity only where\nI would feel that there is some problem happening with the commit that\nis in progress. Having an \"awkward\" commit isn't usual and definitely\nnot every time. Though if in future it is required, We can add edit\nthe line namely :\n\n if(!strcmp(k, \"commit.verbose\")) {\n-     verbose = git_config_bool(k, v);\n+    verbose = git_config_int(k, v);\n return 0;\n }\n\nAdditionally we will have to define scenarios and mention them in the\ndocumentation as to how `commit` will react as this cannot be known by\nintuition. This would complicate things for the user who is reading\nthe man pages.\n\nRegards,\nPranit Bauva\n"},{"id":"280824","messageId":"CAPig+cTRWg9yB7eXhnbgbjjYfrJyn_A-_gQmbW8NL1DEbkLpkQ@mail.gmail.com","threadId":"41686","inReplyTo":"CAFZEwPNAVxT2HVQyj0Wajth_y-P6Af4AcSZDzJDJP=vLHztwiw@mail.gmail.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-03-15T19:24:29Z","receivedAt":"2016-03-15T19:24:29Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Mar 15, 2016 at 3:00 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:\n> On Tue, Mar 15, 2016 at 5:01 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:\n>> You made 'commit.verbose' a boolean, so either verbose or not, ...\n>> ... but note these context lines telling us that --verbose can be\n>> specified not just once but twice (and who knows what the future may\n>> bring).  This raises some not entirely rhetorical questions:\n>>\n>>   - What does 'git config commit.verbose true && git commit --verbose'\n>>     do?\n>\n> This is a nice thought which didn't strike me!\n>\n> As Eric Sunshine mentioned ($gmane.org/288811), it would react\n> according to the multiple verbosity level and since its not currently\n> defined in `commit` it will react as it is reacting when verbosity\n> level is 1.\n\nI get the feeling that you missed SZEDER's point which was that\ngit-commit already behaves differently when --verbose is specified\nmultiple times. (I hadn't gotten around to reviewing that part of the\ncode yet, so I'm glad that SZEDER saved me the effort.)\n\nThe new config variable, which is boolean, doesn't mesh well with\nmultiple verbosity levels. For instance, with a combination of\ncommit.verbose=true and a single --verbose, the code will think that\n--verbose was given twice and use verbosity level 2, which is not at\nall intuitive and would be surprising for the user. So, SZEDER was\nasking how this impedance mismatch can be rectified.\n\nA possibly sane approach would be to make commit.verbose be a\nverbosity level rather than boolean, and behave as follows:\n\n1. if --verbose is used (one or more), completely ignore commit.verbose.\n2. else, if commit.verbose is set, use it.\n3. else, default behavior.\n\nI'm not sure if this makes sense, but as a convenience, maybe also\nrecognize \"true\" and \"false\" as aliases for 1 and 0, respectively, for\nvalues of commit.verbose.\n\nAnd, of course you'd want to test these behaviors.\n"},{"id":"280833","messageId":"CAFZEwPP5AXHCmAg62wVNy_8FuOQxPdYofeb5b=m3g-ugiJkTyw@mail.gmail.com","threadId":"41686","inReplyTo":"CAPig+cTRWg9yB7eXhnbgbjjYfrJyn_A-_gQmbW8NL1DEbkLpkQ@mail.gmail.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-03-15T20:13:40Z","receivedAt":"2016-03-15T20:13:40Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"On Wed, Mar 16, 2016 at 12:54 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>> As Eric Sunshine mentioned ($gmane.org/288811), it would react\n>> according to the multiple verbosity level and since its not currently\n>> defined in `commit` it will react as it is reacting when verbosity\n>> level is 1.\n>\n> I get the feeling that you missed SZEDER's point which was that\n> git-commit already behaves differently when --verbose is specified\n> multiple times. (I hadn't gotten around to reviewing that part of the\n> code yet, so I'm glad that SZEDER saved me the effort.)\n\nMy bad! I missed SZEDER's point.\n\n> The new config variable, which is boolean, doesn't mesh well with\n> multiple verbosity levels. For instance, with a combination of\n> commit.verbose=true and a single --verbose, the code will think that\n> --verbose was given twice and use verbosity level 2, which is not at\n> all intuitive and would be surprising for the user. So, SZEDER was\n> asking how this impedance mismatch can be rectified.\n>\n> A possibly sane approach would be to make commit.verbose be a\n> verbosity level rather than boolean, and behave as follows:\n>\n> 1. if --verbose is used (one or more), completely ignore commit.verbose.\n> 2. else, if commit.verbose is set, use it.\n> 3. else, default behavior.\n>\n> I'm not sure if this makes sense, but as a convenience, maybe also\n> recognize \"true\" and \"false\" as aliases for 1 and 0, respectively, for\n> values of commit.verbose.\n>\n> And, of course you'd want to test these behaviors.\n\nThis seems a good approach to me. I have two ideas of implementing it.\nFirst one to introduce a new variable `config_verbose` to store the\nvalue read by the config. Till then the value of verbose can be set\nthrough command line options. Depending on the situation as you\ndescribed, it can then make the modification. Another approach would\nbe to swap the places where the configuration file is read and where\narguments are parsed. I personally think the first approach as more\nappropriate as in the latter one, there might be some parts of code\nwhich can break. As for the part of alias, I can use the method\ngit_config_bool_or_int() which takes care about aliasing for me. I\nwill also write tests for this behavior.\n"},{"id":"280836","messageId":"xmqqlh5j7am8.fsf@gitster.mtv.corp.google.com","threadId":"41686","inReplyTo":"CAFZEwPP5AXHCmAg62wVNy_8FuOQxPdYofeb5b=m3g-ugiJkTyw@mail.gmail.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-15T20:24:31Z","receivedAt":"2016-03-15T20:24:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pranit Bauva <pranit.bauva@gmail.com> writes:\n\n> First one to introduce a new variable `config_verbose` to store the\n> value read by the config. Till then the value of verbose can be set\n> through command line options. Depending on the situation as you\n> described, it can then make the modification. Another approach would\n> be to swap the places where the configuration file is read and where\n> arguments are parsed. I personally think the first approach as more\n> appropriate as in the latter one, there might be some parts of code\n> which can break.\n\nChanging config-first-and-then-command-line is likely to break\nthings, unless you do a lot more work to avoid breakage ;-)\n\nWouldn't it be the simplest to do:\n\n * initialize opt-verbose to \"unspecified\";\n * initialize config-verbosity to \"unspecified\";\n * let git_config() update config-verbosity;\n * let parse_options() update opt-verbose.\n\nand then\n\n * if opt-verbose is still \"unspecified\", then overwrite it with\n   config-verbosity.\n\n * if opt-verbose is still \"unspecified\" after that, then neither\n   the command line nor the configuration gave you verbosity.\n\n * otherwise opt-verbose at this point has what verbosity level to\n   use.\n\n?\n"},{"id":"280838","messageId":"CAFZEwPOK1hH8CuFc6TohDc5xq7GXpp0DBnQi4QQ6m+8dspUbeQ@mail.gmail.com","threadId":"41686","inReplyTo":"xmqqlh5j7am8.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-03-15T21:09:51Z","receivedAt":"2016-03-15T21:09:51Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"On Wed, Mar 16, 2016 at 1:54 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Pranit Bauva <pranit.bauva@gmail.com> writes:\n>\n>> First one to introduce a new variable `config_verbose` to store the\n>> value read by the config. Till then the value of verbose can be set\n>> through command line options. Depending on the situation as you\n>> described, it can then make the modification. Another approach would\n>> be to swap the places where the configuration file is read and where\n>> arguments are parsed. I personally think the first approach as more\n>> appropriate as in the latter one, there might be some parts of code\n>> which can break.\n>\n> Changing config-first-and-then-command-line is likely to break\n> things, unless you do a lot more work to avoid breakage ;-)\n\nI had guessed this correctly! :)\n\n> Wouldn't it be the simplest to do:\n>\n>  * initialize opt-verbose to \"unspecified\";\n>  * initialize config-verbosity to \"unspecified\";\n>  * let git_config() update config-verbosity;\n>  * let parse_options() update opt-verbose.\n>\n> and then\n>\n>  * if opt-verbose is still \"unspecified\", then overwrite it with\n>    config-verbosity.\n>\n>  * if opt-verbose is still \"unspecified\" after that, then neither\n>    the command line nor the configuration gave you verbosity.\n>\n>  * otherwise opt-verbose at this point has what verbosity level to\n>    use.\n>\n> ?\nI just realized that both of our approaches breaks the condition with\nno-verbose.\nIf commit.verbose is set to true and --no-verbose is passed, then it\nshould not give verbose output.\nBut I suppose that is the reason you are saying \"unspecified\". If\n`opt-verbose` is 0 then it would mean --no-verbose is activated. If it\nis still \"unspecified\" then there would not be any such option. But\nnow the question is how do you set a variable as \"unspecified\". I can\nset `opt-verbose` as -1. But then I am still not convinced for the\nrequirement of another variable `opt-verbose` as I believe that the\n`verbose` and `config_verbose` are quite enough for this. First\n`config_verbose` will read from configuration file. Then `verbose`\nwill read from command line options. If `verbose` is unspecified then\nit will use `config_verbose`, else if `verbose` is 0 it will ignore\n`config_verbose` else if `verbose` has a value greater than 0 then it\nwill stay as it is. Or is there something else which I forgot to\nconsider?\n"},{"id":"280840","messageId":"xmqqh9g77879.fsf@gitster.mtv.corp.google.com","threadId":"41686","inReplyTo":"CAFZEwPOK1hH8CuFc6TohDc5xq7GXpp0DBnQi4QQ6m+8dspUbeQ@mail.gmail.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-15T21:16:42Z","receivedAt":"2016-03-15T21:16:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pranit Bauva <pranit.bauva@gmail.com> writes:\n\n> ... But then I am still not convinced for the\n> requirement of another variable `opt-verbose` as I believe that the\n> `verbose` and `config_verbose` are quite enough for this.\n> ... Or is there something else which I forgot to\n> consider?\n\nI do not think we need three variables.  If there is one \"verbose\"\nthat is initialized to \"unspecified\" (which must be different from\n\"no\", \"yes\", \"even more verbose\"), then it is perfectly fine to\nreuse that as if it were \"opt-verbose\" in my outline.  I just used\nthat name to make it clear where the value comes from for these two\nentities, i.e. to contrast \"opt vs config\" (as opposed to \"(nothing)\nvs config\").\n"},{"id":"280841","messageId":"CAFZEwPN_OTDxHpYvO2VfZEf5fG0X8fefU65XiLFy0Lt2Fs8Hbg@mail.gmail.com","threadId":"41686","inReplyTo":"xmqqh9g77879.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v7] commit: add a commit.verbose config variable","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2016-03-15T21:18:53Z","receivedAt":"2016-03-15T21:18:53Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"On Wed, Mar 16, 2016 at 2:46 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Pranit Bauva <pranit.bauva@gmail.com> writes:\n>\n>> ... But then I am still not convinced for the\n>> requirement of another variable `opt-verbose` as I believe that the\n>> `verbose` and `config_verbose` are quite enough for this.\n>> ... Or is there something else which I forgot to\n>> consider?\n>\n> I do not think we need three variables.  If there is one \"verbose\"\n> that is initialized to \"unspecified\" (which must be different from\n> \"no\", \"yes\", \"even more verbose\"), then it is perfectly fine to\n> reuse that as if it were \"opt-verbose\" in my outline.  I just used\n> that name to make it clear where the value comes from for these two\n> entities, i.e. to contrast \"opt vs config\" (as opposed to \"(nothing)\n> vs config\").\n\nI just wanted to clear out the confusion! I will send the updated\npatch with tests soon!\n"}]}