From 1da744421619e134ed3ff2781b4d97fee78d9cd4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 6 Nov 2009 10:53:56 +0100 Subject: test_remote: fixed test which assumed existance of local master tracking branch, it will now create it if necessary --- test/git/test_remote.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/git/test_remote.py') diff --git a/test/git/test_remote.py b/test/git/test_remote.py index 0af9f0cf..700798dd 100644 --- a/test/git/test_remote.py +++ b/test/git/test_remote.py @@ -240,7 +240,13 @@ class TestRemote(TestBase): lhead = rw_repo.head lindex = rw_repo.index # assure we are on master and it is checked out where the remote is - lhead.reference = rw_repo.heads.master + try: + lhead.reference = rw_repo.heads.master + except AttributeError: + # if the author is on a non-master branch, the clones might not have + # a local master yet. We simply create it + lhead.reference = rw_repo.create_head('master') + # END master handling lhead.reset(remote.refs.master, working_tree=True) # push without spec should fail ( without further configuration ) -- cgit v1.2.1