diff options
| author | Vicent Marti <vicent@github.com> | 2014-03-06 13:14:15 +0100 |
|---|---|---|
| committer | Vicent Marti <vicent@github.com> | 2014-03-06 13:14:15 +0100 |
| commit | efc822ef0d8bb632f8ea5853321084193f5e95b9 (patch) | |
| tree | 942fc712d3df5cec7a8ad04979e0317b1a9a9afa /include/git2/merge.h | |
| parent | a5139485f75c677d391a7ba95f56c38642b7fc4e (diff) | |
| parent | b9f819978c571cc806827e8b3ebc1a58a0755999 (diff) | |
| download | libgit2-efc822ef0d8bb632f8ea5853321084193f5e95b9.tar.gz | |
Merge pull request #2014 from mgbowen/cpp-options-init
Function-based options initializers
Diffstat (limited to 'include/git2/merge.h')
| -rw-r--r-- | include/git2/merge.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h index b45d0fd5e..dc89a0482 100644 --- a/include/git2/merge.h +++ b/include/git2/merge.h @@ -104,6 +104,18 @@ typedef struct { #define GIT_MERGE_TREE_OPTS_VERSION 1 #define GIT_MERGE_TREE_OPTS_INIT {GIT_MERGE_TREE_OPTS_VERSION} +/** + * Initializes a `git_merge_tree_opts` with default values. Equivalent to + * creating an instance with GIT_MERGE_TREE_OPTS_INIT. + * + * @param opts the `git_merge_tree_opts` instance to initialize. + * @param version the version of the struct; you should pass + * `GIT_MERGE_TREE_OPTS_VERSION` here. + * @return Zero on success; -1 on failure. + */ +GIT_EXTERN(int) git_merge_tree_init_opts( + git_merge_tree_opts* opts, + int version); /** * Option flags for `git_merge`. @@ -144,6 +156,18 @@ typedef struct { #define GIT_MERGE_OPTS_VERSION 1 #define GIT_MERGE_OPTS_INIT {GIT_MERGE_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTS_INIT} +/** + * Initializes a `git_merge_opts` with default values. Equivalent to creating + * an instance with GIT_MERGE_OPTS_INIT. + * + * @param opts the `git_merge_opts` instance to initialize. + * @param version the version of the struct; you should pass + * `GIT_MERGE_OPTS_VERSION` here. + * @return Zero on success; -1 on failure. + */ +GIT_EXTERN(int) git_merge_init_opts( + git_merge_opts* opts, + int version); /** * Find a merge base between two commits |
