aboutsummaryrefslogtreecommitdiff
path: root/t/t5801-remote-helpers.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-16 12:18:15 -0700
committerJunio C Hamano <gitster@pobox.com>2014-06-16 12:18:15 -0700
commitc9fc3a6ac5011ce03e8132973687d1242807dc6c (patch)
tree9d8a40b578307a5be129f5385ad28fea3d8e8bad /t/t5801-remote-helpers.sh
parent1a81f6ceea7795e2b78cebd356d276afe79e7626 (diff)
parente143ef4f6b08e0f948180f28ad3ba77c9a2e0a61 (diff)
downloadgit-c9fc3a6ac5011ce03e8132973687d1242807dc6c.tar.gz
git-c9fc3a6ac5011ce03e8132973687d1242807dc6c.tar.xz
Merge branch 'fc/remote-helper-refmap'
Allow remote-helper/fast-import based transport to rename the refs while transferring the history. * fc/remote-helper-refmap: transport-helper: remove unnecessary strbuf resets transport-helper: add support to delete branches fast-export: add support to delete refs fast-import: add support to delete refs transport-helper: add support to push symbolic refs transport-helper: add support for old:new refspec fast-export: add new --refspec option fast-export: improve argument parsing
Diffstat (limited to 't/t5801-remote-helpers.sh')
-rwxr-xr-xt/t5801-remote-helpers.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index a00a66076..241940754 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -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 &&