{"thread":{"id":"38378","subject":"[PATCH] t5543, atomic pushes: test deleting and renaming branches","startedAt":"2015-01-15T20:45:20Z","lastAt":"2015-01-15T20:45:20Z","messageCount":1,"participants":["Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"254776","messageId":"1421354720-13312-1-git-send-email-sbeller@google.com","threadId":"38378","inReplyTo":null,"subject":"[PATCH] t5543, atomic pushes: test deleting and renaming branches","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-01-15T20:45:20Z","receivedAt":"2015-01-15T20:45:20Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Add more test coverage to the atomic push option. It turns out there is a\nbreakage when renaming branches within an atomic push. The breakage occurs\nbecause it cannot lock the refs v/v as well as x.\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n t/t5543-atomic-push.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 49 insertions(+)\n\ndiff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh\nindex 3480b33..96a106b 100755\n--- a/t/t5543-atomic-push.sh\n+++ b/t/t5543-atomic-push.sh\n@@ -191,4 +191,53 @@ test_expect_success 'atomic push is not advertised if configured' '\n \ttest_refs master HEAD@{1}\n '\n \n+test_expect_success 'atomic push handles deletes gracefully' '\n+\tmk_repo_pair &&\n+\t(\n+\t\tcd workbench &&\n+\t\tgit checkout -b todelete &&\n+\t\ttest_commit one &&\n+\t\tgit push --mirror up\n+\t) &&\n+\t(\n+\t\tcd workbench &&\n+\t\tgit checkout -b anotherbranch &&\n+\t\tgit branch -D todelete &&\n+\t\tgit push --mirror --atomic up\n+\t)\n+'\n+\n+test_expect_failure 'atomic push handles renames gracefully' '\n+\t# First push to upstream having the following branches:\n+\t# v, x/x, x/y and y/z. Now rename them and push atomically:\n+\t# v   -> v/v (1)\n+\t# x/x -> x   (2)\n+\t# x/y -> y   (3)\n+\t# y/z -> z   (4)\n+\t# (1) and (2) test (directory/file) conflicts on the branch itself. (3)\n+\t# is testing the (D/F) conflict with another branch involved which is\n+\t# freed in (4)\n+\tmk_repo_pair &&\n+\t(\n+\t\tcd workbench &&\n+\t\tgit checkout -b v &&\n+\t\ttest_commit one &&\n+\t\tgit checkout -b x/x &&\n+\t\ttest_commit two &&\n+\t\tgit checkout -b x/y &&\n+\t\ttest_commit three &&\n+\t\tgit checkout -b y/z &&\n+\t\ttest_commit four &&\n+\t\tgit push --mirror up\n+\t) &&\n+\t(\n+\t\tcd workbench &&\n+\t\tgit branch -m y/z z &&\n+\t\tgit branch -m x/y y &&\n+\t\tgit branch -m x/x x &&\n+\t\tgit branch -m v v/v &&\n+\t\tgit push --atomic up :v :x/x :x/y :y/z v/v x y z\n+\t)\n+'\n+\n test_done\n-- \n2.2.1.62.g3f15098\n"}]}