summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-03-07 19:02:58 +0100
committerVicent Marti <vicent@github.com>2014-03-07 19:02:58 +0100
commit041cd4a23ff4fb17e7e9250521f78819636afbfd (patch)
tree15a87fe64d74d9974d17803e0e573fe56e812686 /include/git2
parent5a6de908f6a89e032f865f7031b0a697c3ecfc4f (diff)
parentaa17c3c63c3e31155015572cf208d89def9fce0c (diff)
downloadlibgit2-041cd4a23ff4fb17e7e9250521f78819636afbfd.tar.gz
Merge pull request #2028 from libgit2/options-names
Rename options structures
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/checkout.h28
-rw-r--r--include/git2/clone.h6
-rw-r--r--include/git2/merge.h4
-rw-r--r--include/git2/revert.h20
4 files changed, 29 insertions, 29 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 702e088d9..69addb7d9 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -225,12 +225,12 @@ typedef void (*git_checkout_progress_cb)(
/**
* Checkout options structure
*
- * Zero out for defaults. Initialize with `GIT_CHECKOUT_OPTS_INIT` macro to
+ * Zero out for defaults. Initialize with `GIT_CHECKOUT_OPTIONS_INIT` macro to
* correctly set the `version` field. E.g.
*
- * git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ * git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
*/
-typedef struct git_checkout_opts {
+typedef struct git_checkout_options {
unsigned int version;
unsigned int checkout_strategy; /** default will be a dry run */
@@ -261,22 +261,22 @@ typedef struct git_checkout_opts {
const char *ancestor_label; /** the name of the common ancestor side of conflicts */
const char *our_label; /** the name of the "our" side of conflicts */
const char *their_label; /** the name of the "their" side of conflicts */
-} git_checkout_opts;
+} git_checkout_options;
-#define GIT_CHECKOUT_OPTS_VERSION 1
-#define GIT_CHECKOUT_OPTS_INIT {GIT_CHECKOUT_OPTS_VERSION}
+#define GIT_CHECKOUT_OPTIONS_VERSION 1
+#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION}
/**
-* Initializes a `git_checkout_opts` with default values. Equivalent to
-* creating an instance with GIT_CHECKOUT_OPTS_INIT.
+* Initializes a `git_checkout_options` with default values. Equivalent to
+* creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
*
-* @param opts the `git_checkout_opts` instance to initialize.
+* @param opts the `git_checkout_options` instance to initialize.
* @param version the version of the struct; you should pass
-* `GIT_CHECKOUT_OPTS_VERSION` here.
+* `GIT_CHECKOUT_OPTIONS_VERSION` here.
* @return Zero on success; -1 on failure.
*/
GIT_EXTERN(int) git_checkout_init_opts(
- git_checkout_opts* opts,
+ git_checkout_options* opts,
int version);
/**
@@ -291,7 +291,7 @@ GIT_EXTERN(int) git_checkout_init_opts(
*/
GIT_EXTERN(int) git_checkout_head(
git_repository *repo,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
/**
* Updates files in the working tree to match the content of the index.
@@ -305,7 +305,7 @@ GIT_EXTERN(int) git_checkout_head(
GIT_EXTERN(int) git_checkout_index(
git_repository *repo,
git_index *index,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
/**
* Updates files in the index and working tree to match the content of the
@@ -321,7 +321,7 @@ GIT_EXTERN(int) git_checkout_index(
GIT_EXTERN(int) git_checkout_tree(
git_repository *repo,
const git_object *treeish,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
/** @} */
GIT_END_DECL
diff --git a/include/git2/clone.h b/include/git2/clone.h
index 98c6fb7d7..20be1a105 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -52,7 +52,7 @@ GIT_BEGIN_DECL
typedef struct git_clone_options {
unsigned int version;
- git_checkout_opts checkout_opts;
+ git_checkout_options checkout_opts;
git_remote_callbacks remote_callbacks;
int bare;
@@ -63,7 +63,7 @@ typedef struct git_clone_options {
} git_clone_options;
#define GIT_CLONE_OPTIONS_VERSION 1
-#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTS_VERSION, GIT_CHECKOUT_SAFE_CREATE}, GIT_REMOTE_CALLBACKS_INIT}
+#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTIONS_VERSION, GIT_CHECKOUT_SAFE_CREATE}, GIT_REMOTE_CALLBACKS_INIT}
/**
* Initializes a `git_clone_options` with default values. Equivalent to
@@ -120,7 +120,7 @@ GIT_EXTERN(int) git_clone(
GIT_EXTERN(int) git_clone_into(
git_repository *repo,
git_remote *remote,
- const git_checkout_opts *co_opts,
+ const git_checkout_options *co_opts,
const char *branch,
const git_signature *signature);
diff --git a/include/git2/merge.h b/include/git2/merge.h
index dc89a0482..3563f35d5 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -150,11 +150,11 @@ typedef struct {
git_merge_tree_opts merge_tree_opts;
/** Options for writing the merge result to the working directory. */
- git_checkout_opts checkout_opts;
+ git_checkout_options checkout_opts;
} git_merge_opts;
#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}
+#define GIT_MERGE_OPTS_INIT {GIT_MERGE_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
/**
* Initializes a `git_merge_opts` with default values. Equivalent to creating
diff --git a/include/git2/revert.h b/include/git2/revert.h
index 088bda94d..3f48c4e4b 100644
--- a/include/git2/revert.h
+++ b/include/git2/revert.h
@@ -27,23 +27,23 @@ typedef struct {
unsigned int mainline;
git_merge_tree_opts merge_tree_opts;
- git_checkout_opts checkout_opts;
-} git_revert_opts;
+ git_checkout_options checkout_opts;
+} git_revert_options;
-#define GIT_REVERT_OPTS_VERSION 1
-#define GIT_REVERT_OPTS_INIT {GIT_REVERT_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTS_INIT}
+#define GIT_REVERT_OPTIONS_VERSION 1
+#define GIT_REVERT_OPTIONS_INIT {GIT_REVERT_OPTIONS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
/**
- * Initializes a `git_revert_opts` with default values. Equivalent to
- * creating an instance with GIT_REVERT_OPTS_INIT.
+ * Initializes a `git_revert_options` with default values. Equivalent to
+ * creating an instance with GIT_REVERT_OPTIONS_INIT.
*
- * @param opts the `git_revert_opts` instance to initialize.
+ * @param opts the `git_revert_options` instance to initialize.
* @param version the version of the struct; you should pass
- * `GIT_REVERT_OPTS_VERSION` here.
+ * `GIT_REVERT_OPTIONS_VERSION` here.
* @return Zero on success; -1 on failure.
*/
GIT_EXTERN(int) git_revert_init_opts(
- git_revert_opts* opts,
+ git_revert_options* opts,
int version);
/**
@@ -80,7 +80,7 @@ int git_revert_commit(
GIT_EXTERN(int) git_revert(
git_repository *repo,
git_commit *commit,
- const git_revert_opts *given_opts);
+ const git_revert_options *given_opts);
/** @} */
GIT_END_DECL