diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2011-06-08 11:27:47 +0200 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2011-06-08 11:27:47 +0200 |
| commit | 74b13c58345d7a8225bbffdfe4d845bb1e703692 (patch) | |
| tree | f1af7353208fb420ef2c8fe883fdf67690f9b656 /git/test/refs | |
| parent | ee9d6b97ad7d7bf6761161dc411258f2aa86d8c0 (diff) | |
| download | GitPython-74b13c58345d7a8225bbffdfe4d845bb1e703692.tar.gz GitPython-74b13c58345d7a8225bbffdfe4d845bb1e703692.zip | |
symbolic reference handles different types for comparison more gracefully. Fixed possible issue in test_refs, which occurred in 0.3 previously
Diffstat (limited to 'git/test/refs')
| -rw-r--r-- | git/test/refs/test_refs.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git/test/refs/test_refs.py b/git/test/refs/test_refs.py index e49b23ab..668dd94c 100644 --- a/git/test/refs/test_refs.py +++ b/git/test/refs/test_refs.py @@ -140,7 +140,6 @@ class TestRefs(TestBase): assert len(log) == 1 assert log[0].oldhexsha == pcommit.NULL_HEX_SHA assert log[0].newhexsha == pcommit.hexsha - def test_refs(self): types_found = set() @@ -285,6 +284,15 @@ class TestRefs(TestBase): assert remotes for remote in remotes: refs = remote.refs + + # If a HEAD exists, it must be deleted first. Otherwise it might + # end up pointing to an invalid ref it the ref was deleted before. + remote_head_name = "HEAD" + if remote_head_name in refs: + RemoteReference.delete(rw_repo, refs[remote_head_name]) + del(refs[remote_head_name]) + #END handle HEAD deletion + RemoteReference.delete(rw_repo, *refs) remote_refs_so_far += len(refs) for ref in refs: |
