X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=t%2Ft5515-fetch-merge-logic.sh;h=3def75eeb29f0eeaa096ab4b9f4511a01a3ce3d8;hb=5f54de5bd07481f6d88e8dbd5551f3356ecbf513;hp=31c108161781165d5e32f08b95089086627eda64;hpb=c78a24986d4d3faff810e87dbcd0ac99f0eabbce;p=~andy%2Fgit diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh index 31c108161..3def75eeb 100755 --- a/t/t5515-fetch-merge-logic.sh +++ b/t/t5515-fetch-merge-logic.sh @@ -131,8 +131,10 @@ do test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'` cnt=`expr $test_count + 1` pfx=`printf "%04d" $cnt` - expect="../../t5515/fetch.$test" - actual="$pfx-fetch.$test" + expect_f="../../t5515/fetch.$test" + actual_f="$pfx-fetch.$test" + expect_r="../../t5515/refs.$test" + actual_r="$pfx-refs.$test" test_expect_success "$cmd" ' { @@ -145,14 +147,24 @@ do rm -f .git/refs/tags/* git fetch "$@" >/dev/null cat .git/FETCH_HEAD - } >"$actual" && - if test -f "$expect" + } >"$actual_f" && + git show-ref >"$actual_r" && + if test -f "$expect_f" then - git diff -u "$expect" "$actual" && - rm -f "$actual" + test_cmp "$expect_f" "$actual_f" && + rm -f "$actual_f" else # this is to help developing new tests. - cp "$actual" "$expect" + cp "$actual_f" "$expect_f" + false + fi && + if test -f "$expect_r" + then + test_cmp "$expect_r" "$actual_r" && + rm -f "$actual_r" + else + # this is to help developing new tests. + cp "$actual_r" "$expect_r" false fi '