diff options
author | Ben Straub <bs@github.com> | 2013-04-15 12:10:18 -0700 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-04-15 12:10:18 -0700 |
commit | 5961d5ea7f77cc442ec7d7c9f698f8c96c050298 (patch) | |
tree | 264ad40ad87186d66760ba2cba7aeee294760da4 | |
parent | 299a224be16368dc36bef4dc3f5e711ce35300cd (diff) | |
download | libgit2-5961d5ea7f77cc442ec7d7c9f698f8c96c050298.tar.gz |
Clean up example code.
-rw-r--r-- | examples/rev-list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rev-list.c b/examples/rev-list.c index 1747f2041..f309207b0 100644 --- a/examples/rev-list.c +++ b/examples/rev-list.c @@ -14,7 +14,7 @@ static void check_error(int error_code, const char *action) exit(1); } -static int push_commit(git_revwalk *walk, git_oid *oid, int hide) +static int push_commit(git_revwalk *walk, const git_oid *oid, int hide) { if (hide) return git_revwalk_hide(walk, oid); @@ -27,7 +27,7 @@ static int push_spec(git_repository *repo, git_revwalk *walk, const char *spec, int error; git_object *obj; - if ((error = git_revparse(&obj, NULL, NULL, repo, spec)) < 0) + if ((error = git_revparse_single(&obj, repo, spec)) < 0) return error; error = push_commit(walk, git_object_id(obj), hide); git_object_free(obj); @@ -36,7 +36,7 @@ static int push_spec(git_repository *repo, git_revwalk *walk, const char *spec, static int push_range(git_repository *repo, git_revwalk *walk, const char *range, int hide) { - git_object left, right; + git_object *left, *right; git_revparse_flag_t flags; int error = 0; |