Subject: Re: [PATCH 08/11] t9200: make test "set -e" clean

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 25 Mar 2026 08:16:01 +0100

On Tue, Mar 24, 2026 at 11:21:11PM -0700, Junio C Hamano wrote:
> diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
> index 14cbe96527..65ef1d7c82 100755
> --- a/t/t9200-git-cvsexportcommit.sh
> +++ b/t/t9200-git-cvsexportcommit.sh
> @@ -11,8 +11,8 @@ if ! test_have_prereq PERL; then
>  	test_done
>  fi
>  
> -cvs >/dev/null 2>&1
> -if test $? -ne 1
> +status=0; cvs >/dev/null 2>&1 || status=$?
> +if test $status -ne 1
>  then
>      skip_all='skipping git cvsexportcommit tests, cvs not found'
>      test_done

Similarly, here I've got:

diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 14cbe96527..581cf3d28f 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -11,8 +11,7 @@ if ! test_have_prereq PERL; then
        test_done
 fi

-cvs >/dev/null 2>&1
-if test $? -ne 1
+if ! cvs version >/dev/null 2>&1
 then
     skip_all='skipping git cvsexportcommit tests, cvs not found'
     test_done

Patrick