mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
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.
This commit is contained in:
@@ -63,7 +63,7 @@ static void do_describe_single(git_repository *repo, describe_options *opts, con
|
||||
git_object *commit;
|
||||
git_describe_result *describe_result;
|
||||
git_buf buf = { 0 };
|
||||
|
||||
|
||||
if (rev) {
|
||||
check_lg2(git_revparse_single(&commit, repo, rev),
|
||||
"Failed to lookup rev", rev);
|
||||
@@ -148,8 +148,8 @@ static void describe_options_init(describe_options *opts)
|
||||
|
||||
opts->commits = NULL;
|
||||
opts->commit_count = 0;
|
||||
git_describe_init_options(&opts->describe_options, GIT_DESCRIBE_OPTIONS_VERSION);
|
||||
git_describe_init_format_options(&opts->format_options, GIT_DESCRIBE_FORMAT_OPTIONS_VERSION);
|
||||
git_describe_options_init(&opts->describe_options, GIT_DESCRIBE_OPTIONS_VERSION);
|
||||
git_describe_format_options_init(&opts->format_options, GIT_DESCRIBE_FORMAT_OPTIONS_VERSION);
|
||||
}
|
||||
|
||||
int lg2_describe(git_repository *repo, int argc, char **argv)
|
||||
|
||||
Reference in New Issue
Block a user