X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5515-fetch-merge-logic.sh;h=65c37744aaa074d173afb862ca43fa668bc19452;hb=40ae8872a1b8ba117e0365832f6621f968b1221e;hp=6c9cc67508f4351f5627b613215e6b88b0adc49a;hpb=6e863d6d129a1b6a13c66d0bb03f3d43db6c51fe;p=git.git diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh index 6c9cc6750..65c37744a 100755 --- a/t/t5515-fetch-merge-logic.sh +++ b/t/t5515-fetch-merge-logic.sh @@ -84,8 +84,7 @@ test_expect_success setup ' git config branch.br-$remote-merge.merge refs/heads/three && git config branch.br-$remote-octopus.remote $remote && git config branch.br-$remote-octopus.merge refs/heads/one && - git config --add branch.br-$remote-octopus.merge two && - git config --add branch.br-$remote-octopus.merge remotes/rem/three + git config --add branch.br-$remote-octopus.merge two done ' @@ -132,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" ' { @@ -146,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" + git diff -u "$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 + git diff -u "$expect_r" "$actual_r" && + rm -f "$actual_r" + else + # this is to help developing new tests. + cp "$actual_r" "$expect_r" false fi '