summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-01-18 17:56:05 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-24 15:12:56 -0600
commit4b331f020e29bf04525773c058e5015242c71eb5 (patch)
tree99dd6e4b867bd7436c36155ae7c672e8955a1de8 /include
parent82050fa1bebbe3ea7627af0d5f8c5c3e3920493a (diff)
downloadlibgit2-4b331f020e29bf04525773c058e5015242c71eb5.tar.gz
revwalk functions: return an int
Stop returning a void for functions, future-proofing them to allow them to fail.
Diffstat (limited to 'include')
-rw-r--r--include/git2/revwalk.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h
index 9cb0d0a67..98dcbf8d1 100644
--- a/include/git2/revwalk.h
+++ b/include/git2/revwalk.h
@@ -84,8 +84,9 @@ GIT_EXTERN(int) git_revwalk_new(git_revwalk **out, git_repository *repo);
* is over.
*
* @param walker handle to reset.
+ * @return 0 or an error code
*/
-GIT_EXTERN(void) git_revwalk_reset(git_revwalk *walker);
+GIT_EXTERN(int) git_revwalk_reset(git_revwalk *walker);
/**
* Add a new root for the traversal
@@ -224,8 +225,9 @@ GIT_EXTERN(int) git_revwalk_next(git_oid *out, git_revwalk *walk);
*
* @param walk the walker being used for the traversal.
* @param sort_mode combination of GIT_SORT_XXX flags
+ * @return 0 or an error code
*/
-GIT_EXTERN(void) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode);
+GIT_EXTERN(int) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode);
/**
* Push and hide the respective endpoints of the given range.
@@ -246,8 +248,10 @@ GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
* Simplify the history by first-parent
*
* No parents other than the first for each commit will be enqueued.
+ *
+ * @return 0 or an error code
*/
-GIT_EXTERN(void) git_revwalk_simplify_first_parent(git_revwalk *walk);
+GIT_EXTERN(int) git_revwalk_simplify_first_parent(git_revwalk *walk);
/**