Subject: Re: [PATCH v5.1] lib-submodule-update: pass 'test_must_fail' as an argument

From: Đoàn Trần Công Danh <[email-masked]>
Date: Wed, 24 Jun 2020 07:16:54 +0700

On 2020-06-23 16:21:20-0400, Denton Liu <[email-masked]> wrote:
> diff --git a/t/t4137-apply-submodule.sh b/t/t4137-apply-submodule.sh
> index b645e303a0..5477d48ffd 100755
> --- a/t/t4137-apply-submodule.sh
> +++ b/t/t4137-apply-submodule.sh
> @@ -6,13 +6,15 @@ test_description='git apply handling submodules'
>  . "$TEST_DIRECTORY"/lib-submodule-update.sh
>  
>  apply_index () {
> -	git diff --ignore-submodules=dirty "..$1" | git apply --index -
> +	git diff --ignore-submodules=dirty "..$1" >diff &&
> +	$2 git apply --index diff
>  }
>  
>  test_submodule_switch_func "apply_index"
>  
>  apply_3way () {
> -	git diff --ignore-submodules=dirty "..$1" | git apply --3way -
> +	git diff --ignore-submodules=dirty "..$1" >diff
> +	$2 git apply --3way diff

It seems like you forgot to chain commands with '&&' here.

>  }
>  
>  test_submodule_switch_func "apply_3way"

-- 
Danh