Code

Merge branch 'lh/submodule-tree-traversal' (early part)
[git.git] / t / t3200-branch.sh
index fdeb1f529ce14d5500976c0e5683c3cbc2fa3501..61a2010f5b0e24a50c6cddda9a17bad67f3214b8 100755 (executable)
@@ -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 &&