diff options
| author | Vicent Martà <vicent@github.com> | 2012-10-30 11:51:58 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-10-30 11:51:58 -0700 |
| commit | 6c21358a89efe5d4b8c5ab26dd707500653ba911 (patch) | |
| tree | 1ab30e4eafa3cff21fb8d6564bcb788b3b03aab6 /tests-clar/index/rename.c | |
| parent | 6cfbbf7e3205e902bd94bf16743127c705e3e588 (diff) | |
| parent | f45ec1a076e2347ba5d63eeb2d158f87b612e5cb (diff) | |
| download | libgit2-6c21358a89efe5d4b8c5ab26dd707500653ba911.tar.gz | |
Merge pull request #1029 from ethomson/index_refactor
Index changes
Diffstat (limited to 'tests-clar/index/rename.c')
| -rw-r--r-- | tests-clar/index/rename.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests-clar/index/rename.c b/tests-clar/index/rename.c index eecd257fd..e16ec00c1 100644 --- a/tests-clar/index/rename.c +++ b/tests-clar/index/rename.c @@ -19,28 +19,28 @@ void test_index_rename__single_file(void) cl_git_mkfile("./rename/lame.name.txt", "new_file\n"); /* This should add a new blob to the object database in 'd4/fa8600b4f37d7516bef4816ae2c64dbf029e3a' */ - cl_git_pass(git_index_add(index, "lame.name.txt", 0)); + cl_git_pass(git_index_add_from_workdir(index, "lame.name.txt")); cl_assert(git_index_entrycount(index) == 1); cl_git_pass(git_oid_fromstr(&expected, "d4fa8600b4f37d7516bef4816ae2c64dbf029e3a")); position = git_index_find(index, "lame.name.txt"); - entry = git_index_get(index, position); + entry = git_index_get_byindex(index, position); cl_assert(git_oid_cmp(&expected, &entry->oid) == 0); /* This removes the entry from the index, but not from the object database */ - cl_git_pass(git_index_remove(index, position)); + cl_git_pass(git_index_remove(index, "lame.name.txt", 0)); cl_assert(git_index_entrycount(index) == 0); p_rename("./rename/lame.name.txt", "./rename/fancy.name.txt"); - cl_git_pass(git_index_add(index, "fancy.name.txt", 0)); + cl_git_pass(git_index_add_from_workdir(index, "fancy.name.txt")); cl_assert(git_index_entrycount(index) == 1); position = git_index_find(index, "fancy.name.txt"); - entry = git_index_get(index, position); + entry = git_index_get_byindex(index, position); cl_assert(git_oid_cmp(&expected, &entry->oid) == 0); git_index_free(index); |
