summaryrefslogtreecommitdiff
path: root/tests-clar/index/tests.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2013-01-12 13:47:56 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2013-01-12 13:47:56 -0600
commit25743bd7c5f14f2287d9c4fdf953c978e3b16916 (patch)
tree7390d1d2d5d52f549329853903f381e58c1b1de6 /tests-clar/index/tests.c
parente2d2c6e57d122f381fb42b7df1c7a12819050490 (diff)
downloadlibgit2-25743bd7c5f14f2287d9c4fdf953c978e3b16916.tar.gz
add an index_remove_bypath that removes conflicts, renamed add_from_workdir to match
Diffstat (limited to 'tests-clar/index/tests.c')
-rw-r--r--tests-clar/index/tests.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c
index 5c3d4cf41..3c2a6899c 100644
--- a/tests-clar/index/tests.c
+++ b/tests-clar/index/tests.c
@@ -233,7 +233,7 @@ void test_index_tests__add(void)
cl_git_pass(git_oid_fromstr(&id1, "a8233120f6ad708f843d861ce2b7228ec4e3dec6"));
/* Add the new file to the index */
- cl_git_pass(git_index_add_from_workdir(index, "test.txt"));
+ cl_git_pass(git_index_add_bypath(index, "test.txt"));
/* Wow... it worked! */
cl_assert(git_index_entrycount(index) == 1);
@@ -250,7 +250,7 @@ void test_index_tests__add(void)
git_repository_free(repo);
}
-void test_index_tests__add_from_workdir_to_a_bare_repository_returns_EBAREPO(void)
+void test_index_tests__add_bypath_to_a_bare_repository_returns_EBAREPO(void)
{
git_repository *bare_repo;
git_index *index;
@@ -258,7 +258,7 @@ void test_index_tests__add_from_workdir_to_a_bare_repository_returns_EBAREPO(voi
cl_git_pass(git_repository_open(&bare_repo, cl_fixture("testrepo.git")));
cl_git_pass(git_repository_index(&index, bare_repo));
- cl_assert_equal_i(GIT_EBAREREPO, git_index_add_from_workdir(index, "test.txt"));
+ cl_assert_equal_i(GIT_EBAREREPO, git_index_add_bypath(index, "test.txt"));
git_index_free(index);
git_repository_free(bare_repo);
@@ -280,7 +280,7 @@ void test_index_tests__write_invalid_filename(void)
cl_git_mkfile("./read_tree/.git/hello", NULL);
- cl_git_pass(git_index_add_from_workdir(index, ".git/hello"));
+ cl_git_pass(git_index_add_bypath(index, ".git/hello"));
/* write-tree */
cl_git_fail(git_index_write_tree(&expected, index));
@@ -303,7 +303,7 @@ void test_index_tests__remove_entry(void)
cl_assert(git_index_entrycount(index) == 0);
cl_git_mkfile("index_test/hello", NULL);
- cl_git_pass(git_index_add_from_workdir(index, "hello"));
+ cl_git_pass(git_index_add_bypath(index, "hello"));
cl_git_pass(git_index_write(index));
cl_git_pass(git_index_read(index)); /* reload */
@@ -339,10 +339,10 @@ void test_index_tests__remove_directory(void)
cl_git_mkfile("index_test/a/3.txt", NULL);
cl_git_mkfile("index_test/b.txt", NULL);
- cl_git_pass(git_index_add_from_workdir(index, "a/1.txt"));
- cl_git_pass(git_index_add_from_workdir(index, "a/2.txt"));
- cl_git_pass(git_index_add_from_workdir(index, "a/3.txt"));
- cl_git_pass(git_index_add_from_workdir(index, "b.txt"));
+ cl_git_pass(git_index_add_bypath(index, "a/1.txt"));
+ cl_git_pass(git_index_add_bypath(index, "a/2.txt"));
+ cl_git_pass(git_index_add_bypath(index, "a/3.txt"));
+ cl_git_pass(git_index_add_bypath(index, "b.txt"));
cl_git_pass(git_index_write(index));
cl_git_pass(git_index_read(index)); /* reload */