From: Eric Sunshine Date: Thu, 01 Dec 2022 19:19:50 GMT Subject: Re: [PATCH v2 0/3] diff: build parseopts array on demand Message-ID: In-Reply-To: <572e29a2-3f19-e946-d152-009999651084@web.de> On Thu, Dec 1, 2022 at 2:11 PM René Scharfe wrote: > t4205-log-pretty-formats.sh (Wstat: 256 Tests: 21 Failed: 0) > Non-zero exit status: 1 > Parse errors: No plan found in TAP output > > The TAP error in t4205-log-pretty-formats.sh is fixed by the following > patch, but I can't explain it: > > diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh > @@ -156,7 +156,7 @@ test_expect_success 'NUL termination with --reflog --pretty=oneline' ' > for r in $revs > do > git show -s --pretty=oneline "$r" >raw && > - cat raw | lf_to_nul || exit 1 > + cat raw | lf_to_nul || return 1 > done >expect && Makes sense. The `exit 1` undesirably causes the entire script to abort, which means test_done() is never invoked, whereas `return 1` makes only the test fail. `exit 1` would be appropriate inside a subshell but there is no subshell here.