From e1aacbbcb73a12c4eee132f2bbe57a9a6e0e800f Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 19 Jan 2018 18:27:56 +0100 Subject: push: allow to push from detached heads --- tests/component/deb/test_push.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3