Re: [PATCH v2] pretty: add "%aL"|"%al|%cL|%cl" option to output local-part of email addresses

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

 



Just a couple of test nits:

On Thu, Oct 24, 2019 at 08:53:32AM -0400, Prarit Bhargava wrote:
> +test_expect_success 'log pretty %an %ae %al %aN %aE %aL' '
> +	git checkout -b anaeal &&
> +	test_commit anaeal_test anaeal_test_file &&
> +	git log --pretty="%an%n%ae%n%al%n%aN%n%aE%n%aL" -1 > actual &&

Style: no space between redirection and filename, i.e. >actual

> +	{
> +		echo "${GIT_AUTHOR_NAME}" &&
> +		echo "${GIT_AUTHOR_EMAIL}" &&
> +		echo "${TEST_AUTHOR_LOCALNAME}"

Broken &&-chain (though with just a bunch of echos it won't really
make much of a difference)

> +		echo "${GIT_AUTHOR_NAME}" &&
> +		echo "${GIT_AUTHOR_EMAIL}" &&
> +		echo "${TEST_AUTHOR_LOCALNAME}"

All these variables stand on their own, so the curly braces around
them are unnecessary.

> +	} > expect &&
> +	test_cmp expect actual
> +'
> +
> +test_expect_success 'log pretty %cn %ce %cl %cN %cE %cL' '
> +	git checkout -b cncecl &&
> +	test_commit cncecl_test cncecl_test_file &&
> +	git log --pretty="%cn%n%ce%n%cl%n%cN%n%cE%n%cL" -1 > actual &&
> +	{
> +		echo "${GIT_COMMITTER_NAME}" &&
> +		echo "${GIT_COMMITTER_EMAIL}" &&
> +		echo "${TEST_COMMITTER_LOCALNAME}"
> +		echo "${GIT_COMMITTER_NAME}" &&
> +		echo "${GIT_COMMITTER_EMAIL}" &&
> +		echo "${TEST_COMMITTER_LOCALNAME}"
> +	} > expect &&
> +	test_cmp expect actual
> +'
> +



[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]

  Powered by Linux