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
This commit is contained in:
@ -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 &&
|
||||
|
Reference in New Issue
Block a user