Index: tests/git_rebase_update_test.py |
diff --git a/tests/git_rebase_update_test.py b/tests/git_rebase_update_test.py |
index ee725bc1d2fa9f6303efc435b41c2492d1d20fe7..273e9220488b33bf2ab27c56e806ce3ab336d019 100755 |
--- a/tests/git_rebase_update_test.py |
+++ b/tests/git_rebase_update_test.py |
@@ -259,6 +259,42 @@ class GitRebaseUpdateTest(git_test_utils.GitRepoReadWriteTestBase): |
self.assertIn('\'branch_G\' was merged', output) |
self.assertIn('checking out \'origin/master\'', output) |
+ def testRebaseConflictsKeepGoing(self): |
+ # Pretend that branch_L landed |
+ self.origin.git('checkout', 'master') |
+ with self.origin.open('L', 'w') as f: |
+ f.write('L') |
+ self.origin.git('add', 'L') |
+ self.origin.git_commit('L') |
+ |
+ # Add a commit to branch_K so that things fail |
+ self.repo.git('checkout', 'branch_K') |
+ with self.repo.open('M', 'w') as f: |
+ f.write('NOPE') |
+ self.repo.git('add', 'M') |
+ self.repo.git_commit('K NOPE') |
+ |
+ # Add a commits to branch_L which will work when squashed |
+ self.repo.git('checkout', 'branch_L') |
+ self.repo.git('reset', 'branch_L~') |
+ with self.repo.open('L', 'w') as f: |
+ f.write('NOPE') |
+ self.repo.git('add', 'L') |
+ self.repo.git_commit('L NOPE') |
+ with self.repo.open('L', 'w') as f: |
+ f.write('L') |
+ self.repo.git('add', 'L') |
+ self.repo.git_commit('L YUP') |
+ |
+ # start on a branch which will be deleted |
+ self.repo.git('checkout', 'branch_G') |
+ |
+ self.repo.git('config', 'branch.branch_K.dormant', 'false') |
+ output, _ = self.repo.capture_stdio(self.reup.main, ['-k']) |
+ self.assertIn('--keep-going set, continuing with next branch.', output) |
+ self.assertIn('could not be cleanly rebased:', output) |
+ self.assertIn(' branch_K', output) |
+ |
def testTrackTag(self): |
self.origin.git('tag', 'lkgr', self.origin['M']) |