Re: [PATCHv6 4/6] add tests of commit --fixup

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

 



"Pat Notz" <patnotz@xxxxxxxxx> writes:

> diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
> index 256c4c9..f9a26c8 100755
> --- a/t/t3900-i18n-commit.sh
> +++ b/t/t3900-i18n-commit.sh
> @@ -133,4 +133,31 @@ do
>  	'
>  done
>  
> +test_commit_autosquash_flags () {
> +	H=$1
> +	flag=$2
> +	test_expect_success "commit --$flag with $H encoding" '
> +		git config i18n.commitencoding $H &&
> +		git checkout -b $H-$flag C0 &&
> +		echo $H >>F &&
> +		git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
> +		test_tick &&
> +		echo intermediate stuff >>G &&
> +		git add G &&
> +		git commit -a -m "intermediate commit" &&
> +		test_tick &&
> +		echo $H $flag >>F &&
> +		git commit -a --$flag HEAD~1 $3 &&
> +		E=$(git cat-file commit '$H-$flag' | \
> +			sed -ne "s/^encoding //p") &&
> +		test "z$E" = "z'$H'" &&

A few nits.

 - You don't need that backslash after the pipe (with the vertical bar at
   the end of line the shell knows you haven't finished your statement).

 - I am not sure what the single-quote around only the last two occurrence
   of $H are about.  H and flag are used as part of branch name, so I
   suspect you do not need any quoting around them, no?
--
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]