Apply suggestions from code review
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
diff --git a/include/git2/attr.h b/include/git2/attr.h
index c930550..66100df 100644
--- a/include/git2/attr.h
+++ b/include/git2/attr.h
@@ -354,7 +354,7 @@ GIT_EXTERN(int) git_attr_cache_flush(
*
* git_attr_add_macro(repo, "binary", "-diff -crlf");
*
- * @param repo The repository where to add the macro.
+ * @param repo The repository to add the macro in.
* @param name The name of the macro.
* @param values The value for the macro.
* @return 0 or an error code.
diff --git a/include/git2/branch.h b/include/git2/branch.h
index d33a24f..36a393d 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -34,7 +34,7 @@ GIT_BEGIN_DECL
*
* @param out Pointer where to store the underlying reference.
*
- * @param repo the repository where to create the branch.
+ * @param repo the repository to create the branch in.
*
* @param branch_name Name for the branch; this name is
* validated for consistency. It should also not conflict with
diff --git a/include/git2/commit.h b/include/git2/commit.h
index 2181a7d..67170cb 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -479,7 +479,7 @@ GIT_EXTERN(int) git_commit_create_buffer(
* to the commit and write it into the given repository.
*
* @param out the resulting commit id
- * @param repo the repository where to create the commit.
+ * @param repo the repository to create the commit in.
* @param commit_content the content of the unsigned commit object
* @param signature the signature to add to the commit. Leave `NULL`
* to create a commit without adding a signature field.
diff --git a/include/git2/config.h b/include/git2/config.h
index 07e0093..a5486a4 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -426,7 +426,7 @@ GIT_EXTERN(int) git_config_get_string_buf(git_buf *out, const git_config *cfg, c
* interested in. Use NULL to indicate all
* @param callback the function to be called on each value of the variable
* @param payload opaque pointer to pass to the callback
- * @return non-zero to terminate the iteration.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload);
@@ -442,7 +442,7 @@ GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const cha
* @param name the variable's name
* @param regexp regular expression to filter which variables we're
* interested in. Use NULL to indicate all
- * @return non-zero to terminate the iteration.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_config_multivar_iterator_new(git_config_iterator **out, const git_config *cfg, const char *name, const char *regexp);
@@ -750,7 +750,7 @@ GIT_EXTERN(int) git_config_parse_path(git_buf *out, const char *value);
* @param regexp regular expression to match against config names (can be NULL)
* @param callback the function to call on each variable
* @param payload the data to pass to the callback
- * @return non-zero to terminate the iteration.
+ * @return 0 or an error code.
*/
GIT_EXTERN(int) git_config_backend_foreach_match(
git_config_backend *backend,
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 8af02a6..4bacbd3 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -136,8 +136,7 @@ GIT_EXTERN(int) git_indexer_commit(git_indexer *idx, git_indexer_progress *stats
* names. This is only correct after the index has been finalized.
*
* @param idx the indexer instance
- * @return the packfile's hash. In casewhere the index has not been finalized,
- * it will be zeroed out.
+ * @return the packfile's hash
*/
GIT_EXTERN(const git_oid *) git_indexer_hash(const git_indexer *idx);
diff --git a/include/git2/object.h b/include/git2/object.h
index 2692a40..5610a47 100644
--- a/include/git2/object.h
+++ b/include/git2/object.h
@@ -221,7 +221,7 @@ GIT_EXTERN(int) git_object_peel(
*
* @param dest Pointer to store the copy of the object
* @param source Original object to copy
- * @return 0
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_object_dup(git_object **dest, git_object *source);
diff --git a/include/git2/odb.h b/include/git2/odb.h
index 7b8d6f9..effe2e5 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -348,7 +348,7 @@ GIT_EXTERN(int) git_odb_stream_finalize_write(git_oid *out, git_odb_stream *stre
* Most backends don't implement streaming reads
*
* @param stream the stream
- * @param buffer the buffer where to store the readed data.
+ * @param buffer a user-allocated buffer to store the data in.
* @param len the buffer's length
* @return 0 if the read succeeded, error code otherwise
*/
diff --git a/include/git2/rebase.h b/include/git2/rebase.h
index 5edd443..b1ac71f 100644
--- a/include/git2/rebase.h
+++ b/include/git2/rebase.h
@@ -329,7 +329,7 @@ GIT_EXTERN(int) git_rebase_next(
*
* @param index The result index of the last operation.
* @param rebase The in-progress rebase.
- * @return 0
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_rebase_inmemory_index(
git_index **index,
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 6692537..e276a8a 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -931,7 +931,7 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
* @param name where to store the pointer to the name
* @param email where to store the pointer to the email
* @param repo the repository
- * @return 0
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, const git_repository *repo);
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h
index b8655e5..4aa9f5b 100644
--- a/include/git2/revwalk.h
+++ b/include/git2/revwalk.h
@@ -249,7 +249,7 @@ GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
*
* No parents other than the first for each commit will be enqueued.
*
- * @param walk The revisionwlaker.
+ * @param walk The revision walker.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_simplify_first_parent(git_revwalk *walk);
@@ -278,7 +278,7 @@ GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
*
* @param commit_id oid of Commit
* @param payload User-specified pointer to data to be passed as data payload
- * @return non-zero to hide the commmit and it parrent.
+ * @return non-zero to hide the commmit and it parent.
*/
typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
const git_oid *commit_id,