Skip to content

Commit 433ba61

Browse files
committed
Merge pull request libgit2#2382 from mikeando/doc_fixes
Fixed miscellaneous documentation errors.
2 parents 530594c + 31b0cb5 commit 433ba61

File tree

10 files changed

+31
-34
lines changed

10 files changed

+31
-34
lines changed

include/git2/cherrypick.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ GIT_EXTERN(int) git_cherry_pick_init_options(
5656
* @param cherry_pick_commit the commit to cherry-pick
5757
* @param our_commit the commit to revert against (eg, HEAD)
5858
* @param mainline the parent of the revert commit, if it is a merge
59-
* @param merge_tree_opts the merge tree options (or null for defaults)
59+
* @param merge_options the merge options (or null for defaults)
6060
* @return zero on success, -1 on failure.
6161
*/
6262
GIT_EXTERN(int) git_cherry_pick_commit(

include/git2/errors.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ GIT_BEGIN_DECL
1919

2020
/** Generic return codes */
2121
typedef enum {
22-
GIT_OK = 0, /*< No error */
22+
GIT_OK = 0, /**< No error */
2323

24-
GIT_ERROR = -1, /*< Generic error */
25-
GIT_ENOTFOUND = -3, /*< Requested object could not be found */
26-
GIT_EEXISTS = -4, /*< Object exists preventing operation */
27-
GIT_EAMBIGUOUS = -5, /*< More than one object matches */
28-
GIT_EBUFS = -6, /*< Output buffer too short to hold data */
24+
GIT_ERROR = -1, /**< Generic error */
25+
GIT_ENOTFOUND = -3, /**< Requested object could not be found */
26+
GIT_EEXISTS = -4, /**< Object exists preventing operation */
27+
GIT_EAMBIGUOUS = -5, /**< More than one object matches */
28+
GIT_EBUFS = -6, /**< Output buffer too short to hold data */
2929

3030
/* GIT_EUSER is a special error that is never generated by libgit2
3131
* code. You can return it from a callback (e.g to stop an iteration)
3232
* to know that it was generated by the callback and not by libgit2.
3333
*/
3434
GIT_EUSER = -7,
3535

36-
GIT_EBAREREPO = -8, /*< Operation not allowed on bare repository */
37-
GIT_EUNBORNBRANCH = -9, /*< HEAD refers to branch with no commits */
38-
GIT_EUNMERGED = -10, /*< Merge in progress prevented operation */
39-
GIT_ENONFASTFORWARD = -11, /*< Reference was not fast-forwardable */
40-
GIT_EINVALIDSPEC = -12, /*< Name/ref spec was not in a valid format */
41-
GIT_EMERGECONFLICT = -13, /*< Merge conflicts prevented operation */
42-
GIT_ELOCKED = -14, /*< Lock file prevented operation */
43-
GIT_EMODIFIED = -15, /*< Reference value does not match expected */
36+
GIT_EBAREREPO = -8, /**< Operation not allowed on bare repository */
37+
GIT_EUNBORNBRANCH = -9, /**< HEAD refers to branch with no commits */
38+
GIT_EUNMERGED = -10, /**< Merge in progress prevented operation */
39+
GIT_ENONFASTFORWARD = -11, /**< Reference was not fast-forwardable */
40+
GIT_EINVALIDSPEC = -12, /**< Name/ref spec was not in a valid format */
41+
GIT_EMERGECONFLICT = -13, /**< Merge conflicts prevented operation */
42+
GIT_ELOCKED = -14, /**< Lock file prevented operation */
43+
GIT_EMODIFIED = -15, /**< Reference value does not match expected */
4444

45-
GIT_PASSTHROUGH = -30, /*< Internal only */
46-
GIT_ITEROVER = -31, /*< Signals end of iteration with iterator */
45+
GIT_PASSTHROUGH = -30, /**< Internal only */
46+
GIT_ITEROVER = -31, /**< Signals end of iteration with iterator */
4747
} git_error_code;
4848

4949
/**

include/git2/merge.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ GIT_EXTERN(int) git_merge_head_from_id(
378378
/**
379379
* Gets the commit ID that the given `git_merge_head` refers to.
380380
*
381-
* @param id pointer to commit id to be filled in
382381
* @param head the given merge head
382+
* @return commit id
383383
*/
384384
GIT_EXTERN(const git_oid *) git_merge_head_id(
385385
const git_merge_head *head);
@@ -424,8 +424,8 @@ GIT_EXTERN(int) git_merge_file(
424424
* @param out The git_merge_file_result to be filled in
425425
* @param repo The repository
426426
* @param ancestor The index entry for the ancestor file (stage level 1)
427-
* @param our_path The index entry for our file (stage level 2)
428-
* @param their_path The index entry for their file (stage level 3)
427+
* @param ours The index entry for our file (stage level 2)
428+
* @param theirs The index entry for their file (stage level 3)
429429
* @param opts The merge file options or NULL
430430
* @return 0 on success or error code
431431
*/
@@ -497,8 +497,8 @@ GIT_EXTERN(int) git_merge_commits(
497497
* completes, resolve any conflicts and prepare a commit.
498498
*
499499
* @param repo the repository to merge
500-
* @param merge_heads the heads to merge into
501-
* @param merge_heads_len the number of heads to merge
500+
* @param their_heads the heads to merge into
501+
* @param their_heads_len the number of heads to merge
502502
* @param merge_opts merge options
503503
* @param checkout_opts checkout options
504504
* @return 0 on success or error code

include/git2/reflog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ GIT_EXTERN(int) git_reflog_append(git_reflog *reflog, const git_oid *id, const g
6969
*
7070
* @param repo the repository
7171
* @param old_name the old name of the reference
72-
* @param new_name the new name of the reference
72+
* @param name the new name of the reference
7373
* @return 0 on success, GIT_EINVALIDSPEC or an error code
7474
*/
7575
GIT_EXTERN(int) git_reflog_rename(git_repository *repo, const char *old_name, const char *name);

include/git2/refs.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ GIT_EXTERN(int) git_reference_symbolic_create(git_reference **out, git_repositor
178178
* @param name The name of the reference
179179
* @param id The object id pointed to by the reference.
180180
* @param force Overwrite existing references
181-
* @param force Overwrite existing references
182181
* @param signature The identity that will used to populate the reflog entry
183182
* @param log_message The one line long message to be appended to the reflog
184183
* @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,
221220
* @param name The name of the reference
222221
* @param id The object id pointed to by the reference.
223222
* @param force Overwrite existing references
224-
* @param force Overwrite existing references
225223
* @param current_id The expected value of the reference at the time of update
226224
* @param signature The identity that will used to populate the reflog entry
227225
* @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);
415413
* This method removes the named reference from the repository without
416414
* looking at its old value.
417415
*
418-
* @param ref The reference to remove
416+
* @param name The reference to remove
419417
* @return 0 or an error code
420418
*/
421419
GIT_EXTERN(int) git_reference_remove(git_repository *repo, const char *name);

include/git2/repository.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ GIT_EXTERN(int) git_repository_set_head_detached(
649649
*
650650
* @param repo Repository pointer
651651
* @param signature The identity that will used to populate the reflog entry
652-
* @param log_message The one line long message to be appended to the reflog
652+
* @param reflog_message The one line long message to be appended to the reflog
653653
* @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing
654654
* branch or an error code
655655
*/

include/git2/revert.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ GIT_EXTERN(int) git_revert_init_options(
5656
* @param revert_commit the commit to revert
5757
* @param our_commit the commit to revert against (eg, HEAD)
5858
* @param mainline the parent of the revert commit, if it is a merge
59-
* @param merge_tree_opts the merge tree options (or null for defaults)
59+
* @param merge_options the merge options (or null for defaults)
6060
* @return zero on success, -1 on failure.
6161
*/
6262
int git_revert_commit(
@@ -71,9 +71,8 @@ int git_revert_commit(
7171
* Reverts the given commit, producing changes in the working directory.
7272
*
7373
* @param repo the repository to revert
74-
* @param commits the commits to revert
75-
* @param commits_len the number of commits to revert
76-
* @param flags merge flags
74+
* @param commit the commit to revert
75+
* @param given_opts merge flags
7776
* @return zero on success, -1 on failure.
7877
*/
7978
GIT_EXTERN(int) git_revert(

include/git2/signature.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ GIT_EXTERN(int) git_signature_default(git_signature **out, git_repository *repo)
6969
* Call `git_signature_free()` to free the data.
7070
*
7171
* @param dest pointer where to store the copy
72-
* @param entry signature to duplicate
72+
* @param sig signature to duplicate
7373
* @return 0 or an error code
7474
*/
7575
GIT_EXTERN(int) git_signature_dup(git_signature **dest, const git_signature *sig);

include/git2/submodule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ GIT_EXTERN(const char *) git_submodule_url(git_submodule *submodule);
283283
* Resolve a submodule url relative to the given repository.
284284
*
285285
* @param out buffer to store the absolute submodule url in
286-
* @param repository Pointer to repository object
286+
* @param repo Pointer to repository object
287287
* @param url Relative url
288288
* @return 0 or an error code
289289
*/

include/git2/tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ GIT_EXTERN(int) git_tree_entry_bypath(
151151
* and must be freed explicitly with `git_tree_entry_free()`.
152152
*
153153
* @param dest pointer where to store the copy
154-
* @param entry tree entry to duplicate
154+
* @param source tree entry to duplicate
155155
* @return 0 or an error code
156156
*/
157157
GIT_EXTERN(int) git_tree_entry_dup(git_tree_entry **dest, const git_tree_entry *source);

0 commit comments

Comments
 (0)