diff options
author | Russell Belfer <rb@github.com> | 2012-12-17 11:00:53 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-12-17 11:00:53 -0800 |
commit | 56c72b759c3adb92c0fdab18fccfb25fb561cd4f (patch) | |
tree | 9721502f41527e61265ae56940d30fddd5db9672 /tests-clar/diff/diffiter.c | |
parent | f79535092d86b531793640834bb010fa67dd4c3c (diff) | |
download | libgit2-56c72b759c3adb92c0fdab18fccfb25fb561cd4f.tar.gz |
Fix diff constructor name order confusion
The diff constructor functions had some confusing names, where the
"old" side of the diff was coming after the "new" side. This
reverses the order in the function name to make it less confusing.
Specifically...
* git_diff_index_to_tree becomes git_diff_tree_to_index
* git_diff_workdir_to_index becomes git_diff_index_to_workdir
* git_diff_workdir_to_tree becomes git_diff_tree_to_workdir
Diffstat (limited to 'tests-clar/diff/diffiter.c')
-rw-r--r-- | tests-clar/diff/diffiter.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests-clar/diff/diffiter.c b/tests-clar/diff/diffiter.c index 306a13eb9..8d550ec0f 100644 --- a/tests-clar/diff/diffiter.c +++ b/tests-clar/diff/diffiter.c @@ -16,7 +16,7 @@ void test_diff_diffiter__create(void) git_diff_list *diff; size_t d, num_d; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, NULL)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, NULL)); num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { @@ -34,7 +34,7 @@ void test_diff_diffiter__iterate_files(void) size_t d, num_d; int count = 0; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, NULL)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, NULL)); num_d = git_diff_num_deltas(diff); cl_assert_equal_i(6, (int)num_d); @@ -57,7 +57,7 @@ void test_diff_diffiter__iterate_files_2(void) size_t d, num_d; int count = 0; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, NULL)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, NULL)); num_d = git_diff_num_deltas(diff); cl_assert_equal_i(8, (int)num_d); @@ -85,7 +85,7 @@ void test_diff_diffiter__iterate_files_and_hunks(void) opts.interhunk_lines = 1; opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_INCLUDE_UNTRACKED; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); num_d = git_diff_num_deltas(diff); @@ -138,7 +138,7 @@ void test_diff_diffiter__max_size_threshold(void) opts.interhunk_lines = 1; opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_INCLUDE_UNTRACKED; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { @@ -173,7 +173,7 @@ void test_diff_diffiter__max_size_threshold(void) opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_INCLUDE_UNTRACKED; opts.max_size = 50; /* treat anything over 50 bytes as binary! */ - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { @@ -216,7 +216,7 @@ void test_diff_diffiter__iterate_all(void) opts.interhunk_lines = 1; opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_INCLUDE_UNTRACKED; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { @@ -292,7 +292,7 @@ void test_diff_diffiter__iterate_randomly_while_saving_state(void) opts.interhunk_lines = 1; opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_INCLUDE_UNTRACKED; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); num_d = git_diff_num_deltas(diff); @@ -419,7 +419,7 @@ void test_diff_diffiter__iterate_and_generate_patch_text(void) git_diff_list *diff; size_t d, num_d; - cl_git_pass(git_diff_workdir_to_index(&diff, repo, NULL, NULL)); + cl_git_pass(git_diff_index_to_workdir(&diff, repo, NULL, NULL)); num_d = git_diff_num_deltas(diff); cl_assert_equal_i(8, (int)num_d); @@ -452,13 +452,13 @@ void test_diff_diffiter__checks_options_version(void) opts.version = 0; opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_INCLUDE_UNTRACKED; - cl_git_fail(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_fail(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); err = giterr_last(); cl_assert_equal_i(GITERR_INVALID, err->klass); giterr_clear(); opts.version = 1024; - cl_git_fail(git_diff_workdir_to_index(&diff, repo, NULL, &opts)); + cl_git_fail(git_diff_index_to_workdir(&diff, repo, NULL, &opts)); err = giterr_last(); cl_assert_equal_i(GITERR_INVALID, err->klass); } |