Re: [PATCH v2] commit: support commit.verbose and --no-verbose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 25, 2014 at 01:24:27AM -0500, Caleb Thompson wrote:
...
>  	would be committed at the bottom of the commit message
>  	template.  Note that this diff output doesn't have its
> -	lines prefixed with '#'.
> +	lines prefixed with '#'.  The `commit.verbose` configuration
> +	variable can be set to true to implicitly send this option.
> +
> +--no-verbose::
> +	Do not show the unified diff  at the bottom of the commit message
> +	template.  This is the default behavior, but can be used to override
> +	the`commit.verbose` configuration variable.
> 
Why is there two spaces between "diff  at"?
Needs a space between "the`comm" -> "the `comm".

> +cat >check-for-no-diff <<EOF
> +#!$SHELL_PATH
> +exec grep -v '^diff --git' "\$1"
> +EOF
> +chmod +x check-for-no-diff
> +
Me personally, I would leave it like that for now, since that is
the style being used nearby.  We'll see what others have to say.

I certainly wouldn't convert all the other cases to use
test_expect_success.  Leave that for another patch.

> 
> @@ -48,6 +54,21 @@ test_expect_success 'verbose diff is stripped out (mnemonicprefix)' '
>  	check_message message
>  '
> 
> +test_expect_success 'commit shows verbose diff with set commit.verbose' '
> +	echo morecontent >file &&
> +	git add file &&
> +	test_config commit.verbose true &&
> +	check_message message
> +'
> +
> +test_expect_success 'commit does not show verbose diff with --no-verbose' '
> +	echo morecontent >file &&
> +	git add file &&
> +	test_config commit.verbose true &&
> +	test_set_editor "$PWD/check-for-no-diff" &&
> +	git commit --amend --no-verbose
> +'
> +
I like those better with 'test_config' instead of 'git config', good.

Keep working on it, it is looking better :-)

-- 
Jeremiah Mahler
jmmahler@xxxxxxxxx
http://github.com/jmahler
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]