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/index.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/index.c')
-rw-r--r-- | tests-clar/diff/index.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests-clar/diff/index.c b/tests-clar/diff/index.c index 267b3291c..41941ee28 100644 --- a/tests-clar/diff/index.c +++ b/tests-clar/diff/index.c @@ -32,7 +32,7 @@ void test_diff_index__0(void) memset(&exp, 0, sizeof(exp)); - cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts)); + cl_git_pass(git_diff_tree_to_index(&diff, g_repo, a, NULL, &opts)); cl_git_pass(git_diff_foreach( diff, diff_file_cb, diff_hunk_cb, diff_line_cb, &exp)); @@ -60,7 +60,7 @@ void test_diff_index__0(void) diff = NULL; memset(&exp, 0, sizeof(exp)); - cl_git_pass(git_diff_index_to_tree(&diff, g_repo, b, NULL, &opts)); + cl_git_pass(git_diff_tree_to_index(&diff, g_repo, b, NULL, &opts)); cl_git_pass(git_diff_foreach( diff, diff_file_cb, diff_hunk_cb, diff_line_cb, &exp)); @@ -125,7 +125,7 @@ void test_diff_index__1(void) memset(&exp, 0, sizeof(exp)); - cl_git_pass(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts)); + cl_git_pass(git_diff_tree_to_index(&diff, g_repo, a, NULL, &opts)); cl_assert_equal_i( GIT_EUSER, @@ -150,13 +150,13 @@ void test_diff_index__checks_options_version(void) const git_error *err; opts.version = 0; - cl_git_fail(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts)); + cl_git_fail(git_diff_tree_to_index(&diff, g_repo, a, NULL, &opts)); err = giterr_last(); cl_assert_equal_i(GITERR_INVALID, err->klass); giterr_clear(); opts.version = 1024; - cl_git_fail(git_diff_index_to_tree(&diff, g_repo, a, NULL, &opts)); + cl_git_fail(git_diff_tree_to_index(&diff, g_repo, a, NULL, &opts)); err = giterr_last(); cl_assert_equal_i(GITERR_INVALID, err->klass); } |