git_revert_opts -> git_revert_options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
diff --git a/include/git2/revert.h b/include/git2/revert.h
index fcdf2a2..3f48c4e 100644
--- a/include/git2/revert.h
+++ b/include/git2/revert.h
@@ -28,22 +28,22 @@ typedef struct {
git_merge_tree_opts merge_tree_opts;
git_checkout_options checkout_opts;
-} git_revert_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_OPTIONS_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
diff --git a/src/revert.c b/src/revert.c
index a397a8e..8e84463 100644
--- a/src/revert.c
+++ b/src/revert.c
@@ -67,8 +67,8 @@ cleanup:
static int revert_normalize_opts(
git_repository *repo,
- git_revert_opts *opts,
- const git_revert_opts *given,
+ git_revert_options *opts,
+ const git_revert_options *given,
const char *their_label)
{
int error = 0;
@@ -78,10 +78,10 @@ static int revert_normalize_opts(
GIT_UNUSED(repo);
if (given != NULL)
- memcpy(opts, given, sizeof(git_revert_opts));
+ memcpy(opts, given, sizeof(git_revert_options));
else {
- git_revert_opts default_opts = GIT_REVERT_OPTS_INIT;
- memcpy(opts, &default_opts, sizeof(git_revert_opts));
+ git_revert_options default_opts = GIT_REVERT_OPTIONS_INIT;
+ memcpy(opts, &default_opts, sizeof(git_revert_options));
}
if (!opts->checkout_opts.checkout_strategy)
@@ -166,9 +166,9 @@ done:
int git_revert(
git_repository *repo,
git_commit *commit,
- const git_revert_opts *given_opts)
+ const git_revert_options *given_opts)
{
- git_revert_opts opts;
+ git_revert_options opts;
git_reference *our_ref = NULL;
git_commit *our_commit = NULL;
char commit_oidstr[GIT_OID_HEXSZ + 1];
@@ -179,7 +179,7 @@ int git_revert(
assert(repo && commit);
- GITERR_CHECK_VERSION(given_opts, GIT_REVERT_OPTS_VERSION, "git_revert_opts");
+ GITERR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_options");
if ((error = git_repository__ensure_not_bare(repo, "revert")) < 0)
return error;
@@ -219,13 +219,13 @@ done:
return error;
}
-int git_revert_init_opts(git_revert_opts* opts, int version)
+int git_revert_init_opts(git_revert_options* opts, int version)
{
- if (version != GIT_REVERT_OPTS_VERSION) {
- giterr_set(GITERR_INVALID, "Invalid version %d for git_revert_opts", version);
+ if (version != GIT_REVERT_OPTIONS_VERSION) {
+ giterr_set(GITERR_INVALID, "Invalid version %d for git_revert_options", version);
return -1;
} else {
- git_revert_opts o = GIT_REVERT_OPTS_INIT;
+ git_revert_options o = GIT_REVERT_OPTIONS_INIT;
memcpy(opts, &o, sizeof(o));
return 0;
}
diff --git a/tests/revert/workdir.c b/tests/revert/workdir.c
index 47abeb8..afbdffe 100644
--- a/tests/revert/workdir.c
+++ b/tests/revert/workdir.c
@@ -347,7 +347,7 @@ void test_revert_workdir__conflict_use_ours(void)
{
git_commit *head, *commit;
git_oid head_oid, revert_oid;
- git_revert_opts opts = GIT_REVERT_OPTS_INIT;
+ git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "caf99de3a49827117bb66721010eac461b06a80c", 0, "file1.txt" },
@@ -387,7 +387,7 @@ void test_revert_workdir__rename_1_of_2(void)
{
git_commit *head, *commit;
git_oid head_oid, revert_oid;
- git_revert_opts opts = GIT_REVERT_OPTS_INIT;
+ git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "747726e021bc5f44b86de60e3032fd6f9f1b8383", 0, "file1.txt" },
@@ -421,7 +421,7 @@ void test_revert_workdir__rename(void)
{
git_commit *head, *commit;
git_oid head_oid, revert_oid;
- git_revert_opts opts = GIT_REVERT_OPTS_INIT;
+ git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "55acf326a69f0aab7a974ec53ffa55a50bcac14e", 1, "file4.txt" },
@@ -480,7 +480,7 @@ void test_revert_workdir__nonmerge_fails_mainline_specified(void)
{
git_reference *head;
git_commit *commit;
- git_revert_opts opts = GIT_REVERT_OPTS_INIT;
+ git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
cl_git_pass(git_repository_head(&head, repo));
cl_git_pass(git_reference_peel((git_object **)&commit, head, GIT_OBJ_COMMIT));
@@ -518,7 +518,7 @@ void test_revert_workdir__merge_first_parent(void)
{
git_commit *head;
git_oid head_oid;
- git_revert_opts opts = GIT_REVERT_OPTS_INIT;
+ git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "296a6d3be1dff05c5d1f631d2459389fa7b619eb", 0, "file-mainline.txt" },
@@ -543,7 +543,7 @@ void test_revert_workdir__merge_second_parent(void)
{
git_commit *head;
git_oid head_oid;
- git_revert_opts opts = GIT_REVERT_OPTS_INIT;
+ git_revert_options opts = GIT_REVERT_OPTIONS_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "33c6fd981c49a2abf2971482089350bfc5cda8ea", 0, "file-branch.txt" },
diff --git a/tests/structinit/structinit.c b/tests/structinit/structinit.c
index ec4f439..1df970d 100644
--- a/tests/structinit/structinit.c
+++ b/tests/structinit/structinit.c
@@ -92,8 +92,8 @@ void test_structinit_structinit__compare(void)
/* revert */
CHECK_MACRO_FUNC_INIT_EQUAL( \
- git_revert_opts, GIT_REVERT_OPTS_VERSION, \
- GIT_REVERT_OPTS_INIT, git_revert_init_opts);
+ git_revert_options, GIT_REVERT_OPTIONS_VERSION, \
+ GIT_REVERT_OPTIONS_INIT, git_revert_init_opts);
/* status */
CHECK_MACRO_FUNC_INIT_EQUAL( \