* [PATCH] t5543, atomic pushes: test deleting and renaming branches
@ 2015-01-15 20:45 Stefan Beller
0 siblings, 0 replies; only message in thread
From: Stefan Beller @ 2015-01-15 20:45 UTC (permalink / raw)
To: git, gitster, mhagger; +Cc: Stefan Beller
Add more test coverage to the atomic push option. It turns out there is a
breakage when renaming branches within an atomic push. The breakage occurs
because it cannot lock the refs v/v as well as x.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
t/t5543-atomic-push.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh
index 3480b33..96a106b 100755
--- a/t/t5543-atomic-push.sh
+++ b/t/t5543-atomic-push.sh
@@ -191,4 +191,53 @@ test_expect_success 'atomic push is not advertised if configured' '
test_refs master HEAD@{1}
'
+test_expect_success 'atomic push handles deletes gracefully' '
+ mk_repo_pair &&
+ (
+ cd workbench &&
+ git checkout -b todelete &&
+ test_commit one &&
+ git push --mirror up
+ ) &&
+ (
+ cd workbench &&
+ git checkout -b anotherbranch &&
+ git branch -D todelete &&
+ git push --mirror --atomic up
+ )
+'
+
+test_expect_failure 'atomic push handles renames gracefully' '
+ # First push to upstream having the following branches:
+ # v, x/x, x/y and y/z. Now rename them and push atomically:
+ # v -> v/v (1)
+ # x/x -> x (2)
+ # x/y -> y (3)
+ # y/z -> z (4)
+ # (1) and (2) test (directory/file) conflicts on the branch itself. (3)
+ # is testing the (D/F) conflict with another branch involved which is
+ # freed in (4)
+ mk_repo_pair &&
+ (
+ cd workbench &&
+ git checkout -b v &&
+ test_commit one &&
+ git checkout -b x/x &&
+ test_commit two &&
+ git checkout -b x/y &&
+ test_commit three &&
+ git checkout -b y/z &&
+ test_commit four &&
+ git push --mirror up
+ ) &&
+ (
+ cd workbench &&
+ git branch -m y/z z &&
+ git branch -m x/y y &&
+ git branch -m x/x x &&
+ git branch -m v v/v &&
+ git push --atomic up :v :x/x :x/y :y/z v/v x y z
+ )
+'
+
test_done
--
2.2.1.62.g3f15098
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-15 20:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 20:45 [PATCH] t5543, atomic pushes: test deleting and renaming branches Stefan Beller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).