diff options
author | Waleed Khan <me@waleedkhan.name> | 2021-06-13 16:42:00 -0700 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-06-30 08:58:13 -0500 |
commit | ac7ca56652da5484b14f8d3e96d21837db770fdd (patch) | |
tree | d941bd1f71b36378e4f8647b2651d475809f1285 | |
parent | 5f7df15de5d93b2477ca07b938b94f4734bfc3ed (diff) | |
download | libgit2-ac7ca56652da5484b14f8d3e96d21837db770fdd.tar.gz |
Fix misleading doc for `git_index_find`
In https://github.com/libgit2/libgit2/pull/5723/files/fc46dc06f52f854f74371682f911f13856c68edb#r540092847, I was confused by the semantics of `git_index_find`. The documentation says both that it returns the output value in `at_pos` and that it returns it directly as an `int`. This is incorrect; the return value is only returned via `at_pos`.
-rw-r--r-- | include/git2/index.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/git2/index.h b/include/git2/index.h index 14a132497..dd9227755 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -702,7 +702,7 @@ GIT_EXTERN(int) git_index_update_all( * @param at_pos the address to which the position of the index entry is written (optional) * @param index an existing index object * @param path path to search - * @return a zero-based position in the index if found; GIT_ENOTFOUND otherwise + * @return 0 with valid value in at_pos; an error code otherwise */ GIT_EXTERN(int) git_index_find(size_t *at_pos, git_index *index, const char *path); |