diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-06 16:36:23 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-14 09:57:00 +0100 |
commit | 0b5ba0d744e69da5dc8c08d167c83dd87ed83af2 (patch) | |
tree | 0dcca647cc9d9fe8080c2b0ea483dff5d74ee566 /tests/diff/tree.c | |
parent | a5ddae68f86b459ce53319c8af1e7b1ea7d21dd6 (diff) | |
download | libgit2-0b5ba0d744e69da5dc8c08d167c83dd87ed83af2.tar.gz |
Rename opt init functions to `options_init`
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`. Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.
The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.
Deprecate the old names; they'll now call directly to the new ones.
Diffstat (limited to 'tests/diff/tree.c')
-rw-r--r-- | tests/diff/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/diff/tree.c b/tests/diff/tree.c index a3b00ec08..2359a834b 100644 --- a/tests/diff/tree.c +++ b/tests/diff/tree.c @@ -9,7 +9,7 @@ static diff_expects expect; void test_diff_tree__initialize(void) { - cl_git_pass(git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION)); + cl_git_pass(git_diff_options_init(&opts, GIT_DIFF_OPTIONS_VERSION)); memset(&expect, 0, sizeof(expect)); @@ -472,7 +472,7 @@ void test_diff_tree__diff_configs(void) cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, NULL)); - cl_git_pass(git_diff_foreach(diff, + cl_git_pass(git_diff_foreach(diff, diff_file_cb, diff_binary_cb, diff_hunk_cb, diff_line_cb, &expect)); cl_assert_equal_i(2, expect.files); |