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

Re: [PATCH] Introduce commit.verbose config option

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Nov 6, 2011, 12:52 UTC
Message-ID
<20111106125229.GA32270@goldbirke>
In-Reply-To
<20111105182339.27C069004A@inscatolati.net>
On Sat, Nov 05, 2011 at 07:07:35PM +0100, Fernando Vezzosi wrote:
Show 21 quoted lines
> Enabling commit.verbose will make git commit behave as if --verbose was
> passed on the command line.
> 
> Reviewed-by: Sverre Rabbelier <srabbelier@gmail.com>
> Signed-off-by: Fernando Vezzosi <buccia@repnz.net>
> ---
>  Documentation/config.txt |    3 +++
>  builtin/commit.c         |    4 ++++
>  2 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 5a841da..6826788 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -832,6 +832,9 @@ commit.template::
>  	"{tilde}/" is expanded to the value of `$HOME` and "{tilde}user/" to the
>  	specified user's home directory.
>  
> +commit.verbose::
> +	A boolean to enable verbose mode like the --verbose flag does.
> +

I just tried out this patch, and found that setting commit.verbose to true also affects git commit's behavior when invoked from scripts where you can't pass --verbose to git commit. I.e. the diff to be committed is shown for git revert, interactive rebase's reword or squash commands, or during 'git rebase --continue' after resolving a conflict. I think this should be mentioned both in the commit message and in the documentation.

Anyway, I like this change because I have a somewhat convoluted and flaky combination of hooks and editor scripts to do the same, and now I can finally get rid of them.

Best, Gábor

Previous: Nguyen Thai Ngoc Duy
Message 3 of 3 in “Introduce commit.verbose config option”
  1. Introduce commit.verbose config optionFernando Vezzosi, Nov 5, 2011
  2. Nguyen Thai Ngoc DuyNov 6, 2011
  3. SZEDER GáborNov 6, 2011

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.