diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-01-18 17:56:05 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-01-24 15:12:56 -0600 |
| commit | 4b331f020e29bf04525773c058e5015242c71eb5 (patch) | |
| tree | 99dd6e4b867bd7436c36155ae7c672e8955a1de8 /src/revwalk.c | |
| parent | 82050fa1bebbe3ea7627af0d5f8c5c3e3920493a (diff) | |
| download | libgit2-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 'src/revwalk.c')
| -rw-r--r-- | src/revwalk.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/revwalk.c b/src/revwalk.c index 6f49bf2dc..4587b5acc 100644 --- a/src/revwalk.c +++ b/src/revwalk.c @@ -700,7 +700,7 @@ git_repository *git_revwalk_repository(git_revwalk *walk) return walk->repo; } -void git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode) +int git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode) { assert(walk); @@ -719,11 +719,14 @@ void git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode) if (walk->sorting != GIT_SORT_NONE) walk->limited = 1; + + return 0; } -void git_revwalk_simplify_first_parent(git_revwalk *walk) +int git_revwalk_simplify_first_parent(git_revwalk *walk) { walk->first_parent = 1; + return 0; } int git_revwalk_next(git_oid *oid, git_revwalk *walk) @@ -752,7 +755,7 @@ int git_revwalk_next(git_oid *oid, git_revwalk *walk) return error; } -void git_revwalk_reset(git_revwalk *walk) +int git_revwalk_reset(git_revwalk *walk) { git_commit_list_node *commit; @@ -777,6 +780,8 @@ void git_revwalk_reset(git_revwalk *walk) walk->limited = 0; walk->did_push = walk->did_hide = 0; walk->sorting = GIT_SORT_NONE; + + return 0; } int git_revwalk_add_hide_cb( |
