Unverified Commit d4232e7c by Edward Thomson Committed by GitHub

Apply suggestions from code review

parent 7491b3fd
...@@ -354,7 +354,7 @@ GIT_EXTERN(int) git_attr_cache_flush( ...@@ -354,7 +354,7 @@ GIT_EXTERN(int) git_attr_cache_flush(
* *
* git_attr_add_macro(repo, "binary", "-diff -crlf"); * 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 name The name of the macro.
* @param values The value for the macro. * @param values The value for the macro.
* @return 0 or an error code. * @return 0 or an error code.
......
...@@ -34,7 +34,7 @@ GIT_BEGIN_DECL ...@@ -34,7 +34,7 @@ GIT_BEGIN_DECL
* *
* @param out Pointer where to store the underlying reference. * @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 * @param branch_name Name for the branch; this name is
* validated for consistency. It should also not conflict with * validated for consistency. It should also not conflict with
......
...@@ -479,7 +479,7 @@ GIT_EXTERN(int) git_commit_create_buffer( ...@@ -479,7 +479,7 @@ GIT_EXTERN(int) git_commit_create_buffer(
* to the commit and write it into the given repository. * to the commit and write it into the given repository.
* *
* @param out the resulting commit id * @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 commit_content the content of the unsigned commit object
* @param signature the signature to add to the commit. Leave `NULL` * @param signature the signature to add to the commit. Leave `NULL`
* to create a commit without adding a signature field. * to create a commit without adding a signature field.
......
...@@ -426,7 +426,7 @@ GIT_EXTERN(int) git_config_get_string_buf(git_buf *out, const git_config *cfg, c ...@@ -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 * interested in. Use NULL to indicate all
* @param callback the function to be called on each value of the variable * @param callback the function to be called on each value of the variable
* @param payload opaque pointer to pass to the callback * @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); 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 ...@@ -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 name the variable's name
* @param regexp regular expression to filter which variables we're * @param regexp regular expression to filter which variables we're
* interested in. Use NULL to indicate all * 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); 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); ...@@ -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 regexp regular expression to match against config names (can be NULL)
* @param callback the function to call on each variable * @param callback the function to call on each variable
* @param payload the data to pass to the callback * @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_EXTERN(int) git_config_backend_foreach_match(
git_config_backend *backend, git_config_backend *backend,
......
...@@ -136,8 +136,7 @@ GIT_EXTERN(int) git_indexer_commit(git_indexer *idx, git_indexer_progress *stats ...@@ -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. * names. This is only correct after the index has been finalized.
* *
* @param idx the indexer instance * @param idx the indexer instance
* @return the packfile's hash. In casewhere the index has not been finalized, * @return the packfile's hash
* it will be zeroed out.
*/ */
GIT_EXTERN(const git_oid *) git_indexer_hash(const git_indexer *idx); GIT_EXTERN(const git_oid *) git_indexer_hash(const git_indexer *idx);
......
...@@ -221,7 +221,7 @@ GIT_EXTERN(int) git_object_peel( ...@@ -221,7 +221,7 @@ GIT_EXTERN(int) git_object_peel(
* *
* @param dest Pointer to store the copy of the object * @param dest Pointer to store the copy of the object
* @param source Original object to copy * @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); GIT_EXTERN(int) git_object_dup(git_object **dest, git_object *source);
......
...@@ -348,7 +348,7 @@ GIT_EXTERN(int) git_odb_stream_finalize_write(git_oid *out, git_odb_stream *stre ...@@ -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 * Most backends don't implement streaming reads
* *
* @param stream the stream * @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 * @param len the buffer's length
* @return 0 if the read succeeded, error code otherwise * @return 0 if the read succeeded, error code otherwise
*/ */
......
...@@ -329,7 +329,7 @@ GIT_EXTERN(int) git_rebase_next( ...@@ -329,7 +329,7 @@ GIT_EXTERN(int) git_rebase_next(
* *
* @param index The result index of the last operation. * @param index The result index of the last operation.
* @param rebase The in-progress rebase. * @param rebase The in-progress rebase.
* @return 0 * @return 0 or an error code
*/ */
GIT_EXTERN(int) git_rebase_inmemory_index( GIT_EXTERN(int) git_rebase_inmemory_index(
git_index **index, git_index **index,
......
...@@ -931,7 +931,7 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo); ...@@ -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 name where to store the pointer to the name
* @param email where to store the pointer to the email * @param email where to store the pointer to the email
* @param repo the repository * @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); GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, const git_repository *repo);
......
...@@ -249,7 +249,7 @@ GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range); ...@@ -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. * 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 * @return 0 or an error code
*/ */
GIT_EXTERN(int) git_revwalk_simplify_first_parent(git_revwalk *walk); 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); ...@@ -278,7 +278,7 @@ GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
* *
* @param commit_id oid of Commit * @param commit_id oid of Commit
* @param payload User-specified pointer to data to be passed as data payload * @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)( typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
const git_oid *commit_id, const git_oid *commit_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment