On Wed, Sep 29, 2010 at 18:07, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Elijah Newren <newren@xxxxxxxxx> writes: > >> Acked-by: Ãvar ArnfjÃrà Bjarmason <avarab@xxxxxxxxx> >> Signed-off-by: Elijah Newren <newren@xxxxxxxxx> >> --- >> Ât/t4017-diff-retval.sh |  30 ++++++++++-------------------- >> Â1 files changed, 10 insertions(+), 20 deletions(-) >> >> diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh >> index 6158985..6605e12 100755 >> --- a/t/t4017-diff-retval.sh >> +++ b/t/t4017-diff-retval.sh >> @@ -28,37 +28,29 @@ test_expect_success 'git diff --quiet -w ÂHEAD^ HEAD' ' >>    test_must_fail git diff --quiet -w HEAD^ HEAD >> Â' >> >> -test_expect_success 'git diff-tree HEAD^ HEAD' ' >> +test_expect_code 1 'git diff-tree HEAD^ HEAD' ' >>    git diff-tree --exit-code HEAD^ HEAD >> -   test $? = 1 >> Â' It also looks like this will pass for for all exit codes that *aren't* 1, because if $? != 1 +test_expect_code will get the exit code of 1. But if it's 1 then test $? = 0 will return 0, right? >> -test_expect_success 'git diff-tree HEAD^ HEAD -- a' ' >> +test_expect_code 0 'git diff-tree HEAD^ HEAD -- a' ' >>    git diff-tree --exit-code HEAD^ HEAD -- a >> -   test $? = 0 >> Â' > > It probably is better to simply drop "test $? = 0" and keep the > expect-success, no? Yes. -- 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