[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH] t7300: fix broken && chains
From:       Jeff King <peff () peff ! net>
Date:       2015-08-31 18:54:14
Message-ID: 20150831185414.GB20555 () sigill ! intra ! peff ! net
[Download RAW message or body]

On Sun, Aug 30, 2015 at 11:18:09AM +0200, Erik Elfström wrote:

> While we are here, remove some boilerplate by using test_commit.

Darn, I thought we were done finding these after flipping on
GIT_TEST_CHAIN_LINT. :)

> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
> index 27557d6..86ceb38 100755
> --- a/t/t7300-clean.sh
> +++ b/t/t7300-clean.sh
> @@ -432,9 +432,7 @@ test_expect_success 'nested git work tree' '
>  	(
>  		cd foo &&
>  		git init &&
> -		>hello.world
> -		git add . &&
> -		git commit -a -m nested
> +		test_commit nested hello.world
>  	) &&

Unfortunately CHAIN_LINT cannot reach inside a nested subshell. I cannot
think of a way to make it do so, and besides, that is also the way to
override the &&-chain precedence. So I think it is not really possible
to get better coverage here. And such cases as these are not really very
interesting (e.g., here we exclude only minor minor setup steps from the
&&-chain).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic