From 5961d5ea7f77cc442ec7d7c9f698f8c96c050298 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Mon, 15 Apr 2013 12:10:18 -0700 Subject: [PATCH] Clean up example code. --- examples/rev-list.c | 6 +++--- 1 file 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;