X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3200-branch.sh;h=61a2010f5b0e24a50c6cddda9a17bad67f3214b8;hb=f1c8a48a2de69bfc9837c53f2c52ffbe7239dc3e;hp=fdeb1f529ce14d5500976c0e5683c3cbc2fa3501;hpb=eca35a25a92a1ad725af2a549fc9158488c4cc43;p=git.git diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index fdeb1f529..61a2010f5 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -112,13 +112,13 @@ test_expect_success 'config information was renamed, too' \ "test $(git config branch.s.dummy) = Hello && test_must_fail git config branch.s/s/dummy" -test_expect_success 'renaming a symref' \ +test_expect_success 'renaming a symref is not allowed' \ ' git symbolic-ref refs/heads/master2 refs/heads/master && - git branch -m master2 master3 && - git symbolic-ref refs/heads/master3 && + test_must_fail git branch -m master2 master3 && + git symbolic-ref refs/heads/master2 && test -f .git/refs/heads/master && - ! test -f .git/refs/heads/master2 + ! test -f .git/refs/heads/master3 ' test_expect_success \ @@ -194,7 +194,8 @@ test_expect_success 'test deleting branch deletes branch config' \ test_expect_success 'test deleting branch without config' \ 'git branch my7 s && - test "$(git branch -d my7 2>&1)" = "Deleted branch my7."' + sha1=$(git rev-parse my7 | cut -c 1-7) && + test "$(git branch -d my7 2>&1)" = "Deleted branch my7 ($sha1)."' test_expect_success 'test --track without .fetch entries' \ 'git branch --track my8 &&