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

Re: [PATCH v6] commit: add a commit.verbose config variable

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 14, 2016, 21:21 UTC
Message-ID
<CAPig+cRC5kZCtELhTh3em0bv+mfeR58AKd3Y76VM+0J+C+zzcw@mail.gmail.com>
In-Reply-To
<0102015376e53b40-d25f7fdc-4ae1-4aae-b779-052fcf252071-000000@eu-west-1.amazonses.com>
On Mon, Mar 14, 2016 at 4:50 PM, Pranit Bauva <pranit.bauva@gmail.com> wrote:
Show 37 quoted lines
> Add commit.verbose configuration variable as a convenience for those
> who always prefer --verbose.
>
> Helped-by: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
> ---
> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh
> index 2ddf28c..35960b4 100755
> --- a/t/t7507-commit-verbose.sh
> +++ b/t/t7507-commit-verbose.sh
> @@ -96,4 +96,33 @@ test_expect_success 'verbose diff is stripped out with set core.commentChar' '
> +test_expect_success 'commit.verbose true and --verbose omitted' '
> +       git -c commit.verbose=true commit --amend
> +'
> +
> +test_expect_success 'commit.verbose true and --no-verbose' '
> +       test_must_fail git -c commit.verbose=true commit --amend --no-verbose
> +'
> +
> +test_expect_success 'commit.verbose false and --verbose' '
> +       git -c commit.verbose=false commit --amend --verbose
> +'
> +
> +test_expect_success 'commit.verbose false and --verbose omitted' '
> +       test_must_fail git -c commit.verbose=false commit --amend
> +'
> +
> +test_expect_success 'commit.verbose true and --verbose' '
> +       git -c commit.verbose=true commit --amend --verbose
> +'
> +
> +test_expect_success 'commit.verbose false and --no-verbose' '
> +       test_must_fail git -c commit.verbose=false commit --amend --no-verbose
> +'
> +
> +test_expect_success 'status ignores commit.verbose=true' '
> +       git status >actual &&

This is missing the important "-c commit.verbose=false". Without it, you're not really testing anything interesting.

(It was missing in the "something like this" example test I typed directly in the email of my last review[1], which I suppose is a good lesson that "something like this" is not meant as "final" or "trust this".)

[1]: http://article.gmane.org/gmane.comp.version-control.git/288774
> +       ! grep "^diff --git" actual
> +'
> +
>  test_done
Previous: Pranit BauvaNext: Eric Sunshine
Message 2 of 4 in “commit: add a commit.verbose config variable”
  1. commit: add a commit.verbose config variablePranit Bauva, Mar 14, 2016
  2. Eric SunshineMar 14, 2016
  3. Eric SunshineMar 14, 2016
  4. Eric SunshineMar 14, 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.