diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-06 10:53:56 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-06 10:53:56 +0100 |
commit | 1da744421619e134ed3ff2781b4d97fee78d9cd4 (patch) | |
tree | 887abf627fcfc06b6234bd1e19a7ee1e5c459c05 /test/git/test_remote.py | |
parent | d2ff5822dbefa1c9c8177cbf9f0879c5cf4efc5c (diff) | |
download | gitpython-1da744421619e134ed3ff2781b4d97fee78d9cd4.tar.gz |
test_remote: fixed test which assumed existance of local master tracking branch, it will now create it if necessary
Diffstat (limited to 'test/git/test_remote.py')
-rw-r--r-- | test/git/test_remote.py | 8 |
1 files changed, 7 insertions, 1 deletions
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 ) |