summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-07-26 15:53:52 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-07-26 15:53:52 +0200
commit20a7e8208ee46de96050b06d06dfbc3e847668c2 (patch)
tree3ef0c2ae46a008d4a950b3622870059809fb85ca
parent05a62d1a8264e724e8353684de60b46eb6853cbb (diff)
downloadlibgit2-20a7e8208ee46de96050b06d06dfbc3e847668c2.tar.gz
Remove extra git_index_read from the tests
When you open an index with git_index_open, the file is read before the function returns. Thus, calling git_index_read after that is useless. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
-rw-r--r--tests/t06-index.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/t06-index.c b/tests/t06-index.c
index fc6fd5b8b..621e742b3 100644
--- a/tests/t06-index.c
+++ b/tests/t06-index.c
@@ -51,9 +51,6 @@ BEGIN_TEST(read0, "load an empty index")
must_pass(git_index_open(&index, "in-memory-index"));
must_be_true(index->on_disk == 0);
- must_pass(git_index_read(index));
-
- must_be_true(index->on_disk == 0);
must_be_true(git_index_entrycount(index) == 0);
must_be_true(index->entries.sorted);
@@ -68,9 +65,6 @@ BEGIN_TEST(read1, "load a standard index (default test index)")
must_pass(git_index_open(&index, TEST_INDEX_PATH));
must_be_true(index->on_disk);
- must_pass(git_index_read(index));
-
- must_be_true(index->on_disk);
must_be_true(git_index_entrycount(index) == TEST_INDEX_ENTRY_COUNT);
must_be_true(index->entries.sorted);
@@ -93,9 +87,6 @@ BEGIN_TEST(read2, "load a standard index (git.git index)")
must_pass(git_index_open(&index, TEST_INDEX2_PATH));
must_be_true(index->on_disk);
- must_pass(git_index_read(index));
-
- must_be_true(index->on_disk);
must_be_true(git_index_entrycount(index) == TEST_INDEX2_ENTRY_COUNT);
must_be_true(index->entries.sorted);
must_be_true(index->tree != NULL);
@@ -108,7 +99,6 @@ BEGIN_TEST(find0, "find an entry on an index")
unsigned int i;
must_pass(git_index_open(&index, TEST_INDEX_PATH));
- must_pass(git_index_read(index));
for (i = 0; i < ARRAY_SIZE(TEST_ENTRIES); ++i) {
int idx = git_index_find(index, TEST_ENTRIES[i].path);
@@ -138,7 +128,6 @@ BEGIN_TEST(write0, "write an index back to disk")
must_pass(copy_file(TEST_INDEXBIG_PATH, "index_rewrite"));
must_pass(git_index_open(&index, "index_rewrite"));
- must_pass(git_index_read(index));
must_be_true(index->on_disk);
must_pass(git_index_write(index));