Commit 31b0cb518f11d4ec8a95df54d077d51b05fa899c

Michael Anderson 2014-05-22T17:16:21

Fixed miscellaneous documentation errors.

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);