summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-24 01:07:58 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-24 01:07:58 +0200
commit129f90aa8d83d9b250c87b0ba790605c4a2bb06a (patch)
treef31b6a9b9efb4a76d6a4de355c00eb60d72b5418 /test/git/test_index.py
parent57050184f3d962bf91511271af59ee20f3686c3f (diff)
downloadgitpython-129f90aa8d83d9b250c87b0ba790605c4a2bb06a.tar.gz
Multiple partly critical bugfixes related to index handling
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r--test/git/test_index.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py
index 35580135..929d40a3 100644
--- a/test/git/test_index.py
+++ b/test/git/test_index.py
@@ -182,6 +182,9 @@ class TestIndex(TestBase):
index.write()
assert rw_repo.index.entries[manifest_key].hexsha == Diff.NULL_HEX_SHA
+ # write an unchanged index ( just for the fun of it )
+ rw_repo.index.write()
+
# a three way merge would result in a conflict and fails as the command will
# not overwrite any entries in our index and hence leave them unmerged. This is
# mainly a protection feature as the current index is not yet in a tree
@@ -432,6 +435,7 @@ class TestIndex(TestBase):
# same file
entries = index.reset(new_commit).add(['lib/git/head.py']*2, fprogress=self._fprogress_add)
+ assert entries[0].mode & 0644 == 0644
# would fail, test is too primitive to handle this case
# self._assert_fprogress(entries)
self._reset_progress()
@@ -574,7 +578,7 @@ class TestIndex(TestBase):
@with_rw_repo('HEAD')
def test_compare_write_tree(self, rw_repo):
def write_tree(index):
- tree_sha = index.repo.git.write_tree(missing_ok=True)
+ tree_sha = index.write_tree().sha
return Tree(index.repo, tree_sha, 0, '')
# END git cmd write tree