summaryrefslogtreecommitdiff
path: root/test/git/test_refs.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/git/test_refs.py')
-rw-r--r--test/git/test_refs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/git/test_refs.py b/test/git/test_refs.py
index aee9b706..762554dc 100644
--- a/test/git/test_refs.py
+++ b/test/git/test_refs.py
@@ -267,7 +267,10 @@ class TestRefs(TestBase):
# exists, fail unless we force
ex_ref_path = far_away_head.path
self.failUnlessRaises(OSError, ref.rename, ex_ref_path)
- assert ref.rename(ex_ref_path, force=True).path == ex_ref_path and ref.object == orig_obj
+ # if it points to the same commit it works
+ far_away_head.commit = ref.commit
+ ref.rename(ex_ref_path)
+ assert ref.path == ex_ref_path and ref.object == orig_obj
assert ref.rename(ref.path).path == ex_ref_path # rename to same name
# create symbolic refs