{"thread":{"id":"28856","subject":"[PATCH] Introduce commit.verbose config option","startedAt":"2011-11-05T18:07:35Z","lastAt":"2011-11-06T12:52:29Z","messageCount":3,"participants":["Fernando Vezzosi","Nguyen Thai Ngoc Duy","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"178923","messageId":"20111105182339.27C069004A@inscatolati.net","threadId":"28856","inReplyTo":null,"subject":"[PATCH] Introduce commit.verbose config option","fromName":"Fernando Vezzosi","fromEmail":"buccia@repnz.net","sentAt":"2011-11-05T18:07:35Z","receivedAt":"2011-11-05T18:07:35Z","isPatch":true,"sender":{"key":"buccia@repnz.net","avatar":"https://gravatar.com/avatar/67644d6d0b3a1797d9546e07d589fe7ac9351d4b636cc16cb7c13f586aefa51c?d=mp&s=160"},"body":"Enabling commit.verbose will make git commit behave as if --verbose was\npassed on the command line.\n\nReviewed-by: Sverre Rabbelier <srabbelier@gmail.com>\nSigned-off-by: Fernando Vezzosi <buccia@repnz.net>\n---\n Documentation/config.txt |    3 +++\n builtin/commit.c         |    4 ++++\n 2 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 5a841da..6826788 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -832,6 +832,9 @@ commit.template::\n \t\"{tilde}/\" is expanded to the value of `$HOME` and \"{tilde}user/\" to the\n \tspecified user's home directory.\n \n+commit.verbose::\n+\tA boolean to enable verbose mode like the --verbose flag does.\n+\n include::diff-config.txt[]\n \n difftool.<tool>.path::\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex c46f2d1..c2a1f3d 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1331,6 +1331,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \t\tinclude_status = git_config_bool(k, v);\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 \treturn git_status_config(k, v, s);\n }\n-- \n1.7.7.1\n"},{"id":"178946","messageId":"CACsJy8BzAMR17GKxvUrG7Svbum7Xn=+ytBDyu05Nh9f3duHu-w@mail.gmail.com","threadId":"28856","inReplyTo":"20111105182339.27C069004A@inscatolati.net","subject":"Re: [PATCH] Introduce commit.verbose config option","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-11-06T02:51:51Z","receivedAt":"2011-11-06T02:51:51Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Nov 6, 2011 at 1:07 AM, Fernando Vezzosi <buccia@repnz.net> wrote:\n> Enabling commit.verbose will make git commit behave as if --verbose was\n> passed on the command line.\n\nIs it necessary? If you want short command, you would use alias\ninstead of typing \"commit\". Adding --verbose to the alias to make the\ncommand even shorter is straightforward.\n-- \nDuy\n"},{"id":"178964","messageId":"20111106125229.GA32270@goldbirke","threadId":"28856","inReplyTo":"20111105182339.27C069004A@inscatolati.net","subject":"Re: [PATCH] Introduce commit.verbose config option","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2011-11-06T12:52:29Z","receivedAt":"2011-11-06T12:52:29Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sat, Nov 05, 2011 at 07:07:35PM +0100, Fernando Vezzosi wrote:\n> Enabling commit.verbose will make git commit behave as if --verbose was\n> passed on the command line.\n> \n> Reviewed-by: Sverre Rabbelier <srabbelier@gmail.com>\n> Signed-off-by: Fernando Vezzosi <buccia@repnz.net>\n> ---\n>  Documentation/config.txt |    3 +++\n>  builtin/commit.c         |    4 ++++\n>  2 files changed, 7 insertions(+), 0 deletions(-)\n> \n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 5a841da..6826788 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -832,6 +832,9 @@ commit.template::\n>  \t\"{tilde}/\" is expanded to the value of `$HOME` and \"{tilde}user/\" to the\n>  \tspecified user's home directory.\n>  \n> +commit.verbose::\n> +\tA boolean to enable verbose mode like the --verbose flag does.\n> +\n\nI just tried out this patch, and found that setting commit.verbose to\ntrue also affects git commit's behavior when invoked from scripts\nwhere you can't pass --verbose to git commit.  I.e. the diff to be\ncommitted is shown for git revert, interactive rebase's reword or\nsquash commands, or during 'git rebase --continue' after resolving a\nconflict.  I think this should be mentioned both in the commit message\nand in the documentation.\n\nAnyway, I like this change because I have a somewhat convoluted and\nflaky combination of hooks and editor scripts to do the same, and now\nI can finally get rid of them.\n\n\nBest,\nGábor\n"}]}