Merge branch 'fc/remote-helper-refmap'
[gitweb.git] / t / t5801-remote-helpers.sh
index a00a660763451d57b2a9537ec1b99fcfd0c9a831..24194075468819881826c24c08b1aa97bacb9897 100755 (executable)
@@ -87,13 +87,29 @@ test_expect_success 'push new branch by name' '
        compare_refs local HEAD server refs/heads/new-name
 '
 
-test_expect_failure 'push new branch with old:new refspec' '
+test_expect_success 'push new branch with old:new refspec' '
        (cd local &&
         git push origin new-name:new-refspec
        ) &&
        compare_refs local HEAD server refs/heads/new-refspec
 '
 
+test_expect_success 'push new branch with HEAD:new refspec' '
+       (cd local &&
+        git checkout new-name
+        git push origin HEAD:new-refspec-2
+       ) &&
+       compare_refs local HEAD server refs/heads/new-refspec-2
+'
+
+test_expect_success 'push delete branch' '
+       (cd local &&
+        git push origin :new-name
+       ) &&
+       test_must_fail git --git-dir="server/.git" \
+        rev-parse --verify refs/heads/new-name
+'
+
 test_expect_success 'forced push' '
        (cd local &&
        git checkout -b force-test &&