diff options
author | Guido Günther <agx@sigxcpu.org> | 2018-01-19 18:27:56 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-01-19 18:38:28 +0100 |
commit | e1aacbbcb73a12c4eee132f2bbe57a9a6e0e800f (patch) | |
tree | fbd4a0c2f2226612b3c9cba558c74a32e089baca /tests | |
parent | 5e9ab951b69830d265e7daac1471325a532314a9 (diff) |
push: allow to push from detached heads
Diffstat (limited to 'tests')
-rw-r--r-- | tests/component/deb/test_push.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/component/deb/test_push.py b/tests/component/deb/test_push.py index 7d9e485a..35ea5bf0 100644 --- a/tests/component/deb/test_push.py +++ b/tests/component/deb/test_push.py @@ -61,6 +61,17 @@ class TestPush(ComponentTestBase): tags=['debian/2.8-1', 'upstream/2.8']) self.assertEquals(repo.head, self.target.head) + @RepoFixtures.quilt30(opts=['--pristine-tar']) + def test_push_detached_head(self, repo): + repo.checkout("HEAD^{commit}") + repo.add_remote_repo('origin', self.target.path) + self.assertEquals(push(['argv0', '--ignore-branch']), 0) + # Since branch head is detached we don't push it but upstream + # branch and tags must be there: + self._check_repo_state(self.target, None, + ['upstream'], + tags=['debian/2.8-1', 'upstream/2.8']) + @RepoFixtures.native() def test_push_tag_ne_branch(self, repo): repo.add_remote_repo('origin', self.target.path) |