Merge pull request #2382 from mikeando/doc_fixes Fixed miscellaneous documentation errors.
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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
diff --git a/include/git2/cherrypick.h b/include/git2/cherrypick.h
index e998d32..9eccb0a 100644
--- a/include/git2/cherrypick.h
+++ b/include/git2/cherrypick.h
@@ -56,7 +56,7 @@ GIT_EXTERN(int) git_cherry_pick_init_options(
* @param cherry_pick_commit the commit to cherry-pick
* @param our_commit the commit to revert against (eg, HEAD)
* @param mainline the parent of the revert commit, if it is a merge
- * @param merge_tree_opts the merge tree options (or null for defaults)
+ * @param merge_options the merge options (or null for defaults)
* @return zero on success, -1 on failure.
*/
GIT_EXTERN(int) git_cherry_pick_commit(
diff --git a/include/git2/errors.h b/include/git2/errors.h
index e22f0d8..c914653 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -19,13 +19,13 @@ GIT_BEGIN_DECL
/** Generic return codes */
typedef enum {
- GIT_OK = 0, /*< No error */
+ GIT_OK = 0, /**< No error */
- GIT_ERROR = -1, /*< Generic error */
- GIT_ENOTFOUND = -3, /*< Requested object could not be found */
- GIT_EEXISTS = -4, /*< Object exists preventing operation */
- GIT_EAMBIGUOUS = -5, /*< More than one object matches */
- GIT_EBUFS = -6, /*< Output buffer too short to hold data */
+ GIT_ERROR = -1, /**< Generic error */
+ GIT_ENOTFOUND = -3, /**< Requested object could not be found */
+ GIT_EEXISTS = -4, /**< Object exists preventing operation */
+ GIT_EAMBIGUOUS = -5, /**< More than one object matches */
+ GIT_EBUFS = -6, /**< Output buffer too short to hold data */
/* GIT_EUSER is a special error that is never generated by libgit2
* code. You can return it from a callback (e.g to stop an iteration)
@@ -33,17 +33,17 @@ typedef enum {
*/
GIT_EUSER = -7,
- GIT_EBAREREPO = -8, /*< Operation not allowed on bare repository */
- GIT_EUNBORNBRANCH = -9, /*< HEAD refers to branch with no commits */
- GIT_EUNMERGED = -10, /*< Merge in progress prevented operation */
- GIT_ENONFASTFORWARD = -11, /*< Reference was not fast-forwardable */
- GIT_EINVALIDSPEC = -12, /*< Name/ref spec was not in a valid format */
- GIT_EMERGECONFLICT = -13, /*< Merge conflicts prevented operation */
- GIT_ELOCKED = -14, /*< Lock file prevented operation */
- GIT_EMODIFIED = -15, /*< Reference value does not match expected */
+ GIT_EBAREREPO = -8, /**< Operation not allowed on bare repository */
+ GIT_EUNBORNBRANCH = -9, /**< HEAD refers to branch with no commits */
+ GIT_EUNMERGED = -10, /**< Merge in progress prevented operation */
+ GIT_ENONFASTFORWARD = -11, /**< Reference was not fast-forwardable */
+ GIT_EINVALIDSPEC = -12, /**< Name/ref spec was not in a valid format */
+ GIT_EMERGECONFLICT = -13, /**< Merge conflicts prevented operation */
+ GIT_ELOCKED = -14, /**< Lock file prevented operation */
+ GIT_EMODIFIED = -15, /**< Reference value does not match expected */
- GIT_PASSTHROUGH = -30, /*< Internal only */
- GIT_ITEROVER = -31, /*< Signals end of iteration with iterator */
+ GIT_PASSTHROUGH = -30, /**< Internal only */
+ GIT_ITEROVER = -31, /**< Signals end of iteration with iterator */
} git_error_code;
/**
diff --git a/include/git2/merge.h b/include/git2/merge.h
index abbc3a5..7915050 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -378,8 +378,8 @@ GIT_EXTERN(int) git_merge_head_from_id(
/**
* Gets the commit ID that the given `git_merge_head` refers to.
*
- * @param id pointer to commit id to be filled in
* @param head the given merge head
+ * @return commit id
*/
GIT_EXTERN(const git_oid *) git_merge_head_id(
const git_merge_head *head);
@@ -424,8 +424,8 @@ GIT_EXTERN(int) git_merge_file(
* @param out The git_merge_file_result to be filled in
* @param repo The repository
* @param ancestor The index entry for the ancestor file (stage level 1)
- * @param our_path The index entry for our file (stage level 2)
- * @param their_path The index entry for their file (stage level 3)
+ * @param ours The index entry for our file (stage level 2)
+ * @param theirs The index entry for their file (stage level 3)
* @param opts The merge file options or NULL
* @return 0 on success or error code
*/
@@ -497,8 +497,8 @@ GIT_EXTERN(int) git_merge_commits(
* completes, resolve any conflicts and prepare a commit.
*
* @param repo the repository to merge
- * @param merge_heads the heads to merge into
- * @param merge_heads_len the number of heads to merge
+ * @param their_heads the heads to merge into
+ * @param their_heads_len the number of heads to merge
* @param merge_opts merge options
* @param checkout_opts checkout options
* @return 0 on success or error code
diff --git a/include/git2/reflog.h b/include/git2/reflog.h
index df06e1b..ac42a23 100644
--- a/include/git2/reflog.h
+++ b/include/git2/reflog.h
@@ -69,7 +69,7 @@ GIT_EXTERN(int) git_reflog_append(git_reflog *reflog, const git_oid *id, const g
*
* @param repo the repository
* @param old_name the old name of the reference
- * @param new_name the new name of the reference
+ * @param name the new name of the reference
* @return 0 on success, GIT_EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_reflog_rename(git_repository *repo, const char *old_name, const char *name);
diff --git a/include/git2/refs.h b/include/git2/refs.h
index ae2d379..e5bb15c 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -178,7 +178,6 @@ GIT_EXTERN(int) git_reference_symbolic_create(git_reference **out, git_repositor
* @param name The name of the reference
* @param id The object id pointed to by the reference.
* @param force Overwrite existing references
- * @param force Overwrite existing references
* @param signature The identity that will used to populate the reflog entry
* @param log_message The one line long message to be appended to the reflog
* @return 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code
@@ -221,7 +220,6 @@ GIT_EXTERN(int) git_reference_create(git_reference **out, git_repository *repo,
* @param name The name of the reference
* @param id The object id pointed to by the reference.
* @param force Overwrite existing references
- * @param force Overwrite existing references
* @param current_id The expected value of the reference at the time of update
* @param signature The identity that will used to populate the reflog entry
* @param log_message The one line long message to be appended to the reflog
@@ -415,7 +413,7 @@ GIT_EXTERN(int) git_reference_delete(git_reference *ref);
* This method removes the named reference from the repository without
* looking at its old value.
*
- * @param ref The reference to remove
+ * @param name The reference to remove
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reference_remove(git_repository *repo, const char *name);
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 037cb3f..6a8ff45 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -649,7 +649,7 @@ GIT_EXTERN(int) git_repository_set_head_detached(
*
* @param repo Repository pointer
* @param signature The identity that will used to populate the reflog entry
- * @param log_message The one line long message to be appended to the reflog
+ * @param reflog_message The one line long message to be appended to the reflog
* @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing
* branch or an error code
*/
diff --git a/include/git2/revert.h b/include/git2/revert.h
index da37fbe..fc1767c 100644
--- a/include/git2/revert.h
+++ b/include/git2/revert.h
@@ -56,7 +56,7 @@ GIT_EXTERN(int) git_revert_init_options(
* @param revert_commit the commit to revert
* @param our_commit the commit to revert against (eg, HEAD)
* @param mainline the parent of the revert commit, if it is a merge
- * @param merge_tree_opts the merge tree options (or null for defaults)
+ * @param merge_options the merge options (or null for defaults)
* @return zero on success, -1 on failure.
*/
int git_revert_commit(
@@ -71,9 +71,8 @@ int git_revert_commit(
* Reverts the given commit, producing changes in the working directory.
*
* @param repo the repository to revert
- * @param commits the commits to revert
- * @param commits_len the number of commits to revert
- * @param flags merge flags
+ * @param commit the commit to revert
+ * @param given_opts merge flags
* @return zero on success, -1 on failure.
*/
GIT_EXTERN(int) git_revert(
diff --git a/include/git2/signature.h b/include/git2/signature.h
index a1dd1ec..feb1b40 100644
--- a/include/git2/signature.h
+++ b/include/git2/signature.h
@@ -69,7 +69,7 @@ GIT_EXTERN(int) git_signature_default(git_signature **out, git_repository *repo)
* Call `git_signature_free()` to free the data.
*
* @param dest pointer where to store the copy
- * @param entry signature to duplicate
+ * @param sig signature to duplicate
* @return 0 or an error code
*/
GIT_EXTERN(int) git_signature_dup(git_signature **dest, const git_signature *sig);
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 28e2357..864d1c5 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -283,7 +283,7 @@ GIT_EXTERN(const char *) git_submodule_url(git_submodule *submodule);
* Resolve a submodule url relative to the given repository.
*
* @param out buffer to store the absolute submodule url in
- * @param repository Pointer to repository object
+ * @param repo Pointer to repository object
* @param url Relative url
* @return 0 or an error code
*/
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 6669652..56922d4 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -151,7 +151,7 @@ GIT_EXTERN(int) git_tree_entry_bypath(
* and must be freed explicitly with `git_tree_entry_free()`.
*
* @param dest pointer where to store the copy
- * @param entry tree entry to duplicate
+ * @param source tree entry to duplicate
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tree_entry_dup(git_tree_entry **dest, const git_tree_entry *source);