On Sun, Oct 3, 2010 at 14:32, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Elijah Newren wrote: > >> --- a/t/t4019-diff-wserror.sh >> +++ b/t/t4019-diff-wserror.sh >> @@ -40,7 +40,7 @@ prepare_output () { >> >> Âtest_expect_success default ' >> >> - Â Â prepare_output >> + Â Â prepare_output && > > As I asked before: > > The exit status from prepare_output is the exit status from its last > command, which is "grep -v <something blue>". ÂIt seems that never > fails in these test cases, but should we be relying on that? > > So I would be more comfortable with the following on top. > > --- > diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh > index 36f06c7..afd74c8 100755 > --- a/t/t4019-diff-wserror.sh > +++ b/t/t4019-diff-wserror.sh > @@ -36,6 +36,7 @@ prepare_output () { > Â Â Â Âgit diff --color >output > Â Â Â Â$grep_a "$blue_grep" output >error > Â Â Â Â$grep_a -v "$blue_grep" output >normal > + Â Â Â return 0 > Â} > > Âtest_expect_success default ' > If we want to rely on that this would make more sense probably: prepare_output () { - git diff --color >output - $grep_a "$blue_grep" output >error + git diff --color >output && + $grep_a "$blue_grep" output >error && $grep_a -v "$blue_grep" output >normal } But I don't know whether that makes sense. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html