summaryrefslogtreecommitdiff
path: root/gitdb/test/test_refs.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-05-05 19:44:36 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-05-05 19:44:36 +0200
commite03093dd392b92f51b7d7cf66d7b1949b9f843e6 (patch)
treedbd2b85d8b201cb5f2848b3aaa11cffbc96031c2 /gitdb/test/test_refs.py
parent6463c10db377573e695bc504a9451bdb6cbf61f5 (diff)
downloadgitdbmerger.tar.gz
Removed plenty of code which went into git-python. This is just for completeness, gitdb doesn't need to be worked on anymoregitdbmerger
Diffstat (limited to 'gitdb/test/test_refs.py')
-rw-r--r--gitdb/test/test_refs.py39
1 files changed, 19 insertions, 20 deletions
diff --git a/gitdb/test/test_refs.py b/gitdb/test/test_refs.py
index 2c571b7..649542f 100644
--- a/gitdb/test/test_refs.py
+++ b/gitdb/test/test_refs.py
@@ -158,26 +158,25 @@ class TestRefs(TestBase):
cur_head = HEAD(rw_repo)
old_head_commit = cur_head.commit
new_head_commit = cur_head.ref.commit.parents[0]
- if False: #TODO get reset checking back into the game
- cur_head.reset(new_head_commit, index=True) # index only
- assert cur_head.reference.commit == new_head_commit
-
- self.failUnlessRaises(ValueError, cur_head.reset, new_head_commit, index=False, working_tree=True)
- new_head_commit = new_head_commit.parents[0]
- cur_head.reset(new_head_commit, index=True, working_tree=True) # index + wt
- assert cur_head.reference.commit == new_head_commit
-
- # paths - make sure we have something to do
- rw_repo.index.reset(old_head_commit.parents[0])
- cur_head.reset(cur_head, paths = "test")
- cur_head.reset(new_head_commit, paths = "lib")
- # hard resets with paths don't work, its all or nothing
- self.failUnlessRaises(GitCommandError, cur_head.reset, new_head_commit, working_tree=True, paths = "lib")
-
- # we can do a mixed reset, and then checkout from the index though
- cur_head.reset(new_head_commit)
- rw_repo.index.checkout(["lib"], force=True)#
- #END ignore block
+
+ cur_head.reset(new_head_commit, index=True) # index only
+ assert cur_head.reference.commit == new_head_commit
+
+ self.failUnlessRaises(ValueError, cur_head.reset, new_head_commit, index=False, working_tree=True)
+ new_head_commit = new_head_commit.parents[0]
+ cur_head.reset(new_head_commit, index=True, working_tree=True) # index + wt
+ assert cur_head.reference.commit == new_head_commit
+
+ # paths - make sure we have something to do
+ rw_repo.index.reset(old_head_commit.parents[0])
+ cur_head.reset(cur_head, paths = "test")
+ cur_head.reset(new_head_commit, paths = "lib")
+ # hard resets with paths don't work, its all or nothing
+ self.failUnlessRaises(GitCommandError, cur_head.reset, new_head_commit, working_tree=True, paths = "lib")
+
+ # we can do a mixed reset, and then checkout from the index though
+ cur_head.reset(new_head_commit)
+ rw_repo.index.checkout(["lib"], force=True)#
# now that we have a write write repo, change the HEAD reference - its
# like git-reset --soft