Re: [PATCH] sequencer.c: terminate the last line of author-script properly

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

 



That's perfectly fine with me.  I just thought each test case would
run in a separate shell process and that's why I chose not to use a
subshell for the last lines.  I've learned a lot from feedback from
you all.  Thanks!

On Wed, 18 Jul 2018 08:25:22 +0900,
Junio C Hamano wrote:
> 
> I'll squash the following in (which I have been carrying in 'pu' for
> the past few days) unless I hear otherwise soonish to correct the
> issues raised during the review.
> 
> Thanks.
> 
>  t/t3404-rebase-interactive.sh | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
> index 2d189da2f1..b0cef509ab 100755
> --- a/t/t3404-rebase-interactive.sh
> +++ b/t/t3404-rebase-interactive.sh
> @@ -81,11 +81,13 @@ test_expect_success 'rebase -i writes out .git/rebase-merge/author-script in "ed
>  	set_fake_editor &&
>  	FAKE_LINES="edit 1" git rebase -i HEAD^ &&
>  	test -f .git/rebase-merge/author-script &&
> -	unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
> -	eval "$(cat .git/rebase-merge/author-script)" &&
> -	test "$(git show --quiet --pretty=format:%an)" = "$GIT_AUTHOR_NAME" &&
> -	test "$(git show --quiet --pretty=format:%ae)" = "$GIT_AUTHOR_EMAIL" &&
> -	test "$(git show --quiet --date=raw --pretty=format:@%ad)" = "$GIT_AUTHOR_DATE"
> +	(
> +		sane_unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
> +		eval "$(cat .git/rebase-merge/author-script)" &&
> +		test "$(git show --quiet --pretty=format:%an)" = "$GIT_AUTHOR_NAME" &&
> +		test "$(git show --quiet --pretty=format:%ae)" = "$GIT_AUTHOR_EMAIL" &&
> +		test "$(git show --quiet --date=raw --pretty=format:@%ad)" = "$GIT_AUTHOR_DATE"
> +	)
>  '
>  
>  test_expect_success 'rebase -i with the exec command' '
> -- 
> 2.18.0-129-ge3331758f1
> 



[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