Git 1.8.1.3
[gitweb.git] / t / t3200-branch.sh
index ec5f70eebae65bd5e3b3c7e621ec376e7a31474b..80e6be39d7b76d8e5daa6cad24a22a80a42e8eff 100755 (executable)
@@ -265,14 +265,22 @@ test_expect_success 'config information was renamed, too' \
 test_expect_success 'deleting a symref' '
        git branch target &&
        git symbolic-ref refs/heads/symref refs/heads/target &&
-       sha1=$(git rev-parse symref | cut -c 1-7) &&
-       echo "Deleted branch symref (was $sha1)." >expect &&
+       echo "Deleted branch symref (was refs/heads/target)." >expect &&
        git branch -d symref >actual &&
        test_path_is_file .git/refs/heads/target &&
        test_path_is_missing .git/refs/heads/symref &&
        test_i18ncmp expect actual
 '
 
+test_expect_success 'deleting a dangling symref' '
+       git symbolic-ref refs/heads/dangling-symref nowhere &&
+       test_path_is_file .git/refs/heads/dangling-symref &&
+       echo "Deleted branch dangling-symref (was nowhere)." >expect &&
+       git branch -d dangling-symref >actual &&
+       test_path_is_missing .git/refs/heads/dangling-symref &&
+       test_i18ncmp expect actual
+'
+
 test_expect_success 'renaming a symref is not allowed' \
 '
        git symbolic-ref refs/heads/master2 refs/heads/master &&