diff options
Diffstat (limited to 'include/git2/status.h')
-rw-r--r-- | include/git2/status.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/include/git2/status.h b/include/git2/status.h index 0aff56a65..0130b4011 100644 --- a/include/git2/status.h +++ b/include/git2/status.h @@ -36,15 +36,18 @@ GIT_BEGIN_DECL /** * Gather file statuses and run a callback for each one. * - * The callback is passed the path of the file, the status and the data pointer - * passed to this function. If the callback returns something other than - * GIT_SUCCESS, this function will return that value. + * The callback is passed the path of the file, the status and the data + * pointer passed to this function. If the callback returns something other + * than 0, this function will return that value. * * @param repo a repository object * @param callback the function to call on each file - * @return GIT_SUCCESS or the return value of the callback which did not return GIT_SUCCESS + * @return 0 on success or the return value of the callback that was non-zero */ -GIT_EXTERN(int) git_status_foreach(git_repository *repo, int (*callback)(const char *, unsigned int, void *), void *payload); +GIT_EXTERN(int) git_status_foreach( + git_repository *repo, + int (*callback)(const char *, unsigned int, void *), + void *payload); /** * Select the files on which to report status. @@ -115,7 +118,7 @@ typedef struct { */ GIT_EXTERN(int) git_status_foreach_ext( git_repository *repo, - git_status_options *opts, + const git_status_options *opts, int (*callback)(const char *, unsigned int, void *), void *payload); @@ -129,7 +132,10 @@ GIT_EXTERN(int) git_status_foreach_ext( * the file doesn't exist in any of HEAD, the index or the worktree, * GIT_SUCCESS otherwise */ -GIT_EXTERN(int) git_status_file(unsigned int *status_flags, git_repository *repo, const char *path); +GIT_EXTERN(int) git_status_file( + unsigned int *status_flags, + git_repository *repo, + const char *path); /** * Test if the ignore rules apply to a given file. @@ -141,11 +147,14 @@ GIT_EXTERN(int) git_status_file(unsigned int *status_flags, git_repository *repo * * @param ignored boolean returning 0 if the file is not ignored, 1 if it is * @param repo a repository object - * @param path the file to check ignores for, rooted at the repo's workdir - * @return GIT_SUCCESS if the ignore rules could be processed for the file - * (regardless of whether it exists or not), or an error < 0 if they could not. + * @param path the file to check ignores for, rooted at the repo's workdir. + * @return 0 if ignore rules could be processed for the file (regardless + * of whether it exists or not), or an error < 0 if they could not. */ -GIT_EXTERN(int) git_status_should_ignore(int *ignored, git_repository *repo, const char *path); +GIT_EXTERN(int) git_status_should_ignore( + int *ignored, + git_repository *repo, + const char *path); /** @} */ GIT_END_DECL |