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 /include/git2/deprecated.h | |
| 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 'include/git2/deprecated.h')
| -rw-r--r-- | include/git2/deprecated.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h index 177efa61a..09388cbb4 100644 --- a/include/git2/deprecated.h +++ b/include/git2/deprecated.h @@ -8,13 +8,29 @@ #define INCLUDE_git_deprecated_h__ #include "common.h" +#include "blame.h" #include "buffer.h" +#include "checkout.h" +#include "cherrypick.h" +#include "clone.h" +#include "describe.h" +#include "diff.h" #include "errors.h" #include "index.h" +#include "indexer.h" +#include "merge.h" #include "object.h" +#include "proxy.h" #include "refs.h" +#include "rebase.h" #include "remote.h" #include "trace.h" +#include "repository.h" +#include "revert.h" +#include "stash.h" +#include "status.h" +#include "submodule.h" +#include "worktree.h" /* * Users can avoid deprecated functions by defining `GIT_DEPRECATE_HARD`. @@ -316,6 +332,45 @@ typedef git_push_transfer_progress_cb git_push_transfer_progress; /**@}*/ +/** @name Deprecated Options Initialization Functions + * + * These functions are retained for backward compatibility. The newer + * versions of these functions should be preferred in all new code. + * + * There is no plan to remove these backward compatibility functions at + * this time. + */ +/**@{*/ + +GIT_EXTERN(int) git_blame_init_options(git_blame_options *opts, unsigned int version); +GIT_EXTERN(int) git_checkout_init_options(git_checkout_options *opts, unsigned int version); +GIT_EXTERN(int) git_cherrypick_init_options(git_cherrypick_options *opts, unsigned int version); +GIT_EXTERN(int) git_clone_init_options(git_clone_options *opts, unsigned int version); +GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version); +GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version); +GIT_EXTERN(int) git_diff_init_options(git_diff_options *opts, unsigned int version); +GIT_EXTERN(int) git_diff_find_init_options(git_diff_find_options *opts, unsigned int version); +GIT_EXTERN(int) git_diff_format_email_init_options(git_diff_format_email_options *opts, unsigned int version); +GIT_EXTERN(int) git_diff_patchid_init_options(git_diff_patchid_options *opts, unsigned int version); +GIT_EXTERN(int) git_fetch_init_options(git_fetch_options *opts, unsigned int version); +GIT_EXTERN(int) git_indexer_init_options(git_indexer_options *opts, unsigned int version); +GIT_EXTERN(int) git_merge_init_options(git_merge_options *opts, unsigned int version); +GIT_EXTERN(int) git_merge_file_init_input(git_merge_file_input *input, unsigned int version); +GIT_EXTERN(int) git_merge_file_init_options(git_merge_file_options *opts, unsigned int version); +GIT_EXTERN(int) git_proxy_init_options(git_proxy_options *opts, unsigned int version); +GIT_EXTERN(int) git_push_init_options(git_push_options *opts, unsigned int version); +GIT_EXTERN(int) git_rebase_init_options(git_rebase_options *opts, unsigned int version); +GIT_EXTERN(int) git_remote_create_init_options(git_remote_create_options *opts, unsigned int version); +GIT_EXTERN(int) git_repository_init_init_options(git_repository_init_options *opts, unsigned int version); +GIT_EXTERN(int) git_revert_init_options(git_revert_options *opts, unsigned int version); +GIT_EXTERN(int) git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version); +GIT_EXTERN(int) git_status_init_options(git_status_options *opts, unsigned int version); +GIT_EXTERN(int) git_submodule_update_init_options(git_submodule_update_options *opts, unsigned int version); +GIT_EXTERN(int) git_worktree_add_init_options(git_worktree_add_options *opts, unsigned int version); +GIT_EXTERN(int) git_worktree_prune_init_options(git_worktree_prune_options *opts, unsigned int version); + +/**@}*/ + /** @} */ GIT_END_DECL |
