summaryrefslogtreecommitdiff
path: root/src/revwalk.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-04-09 05:03:51 +0400
committerBen Straub <bs@github.com>2013-04-09 05:07:04 +0400
commit1aa21fe3b87a1e601023f49c41fab3ce76c189ac (patch)
treeb25c258e7d360cb9dd7d278094ff12b490a0e61e /src/revwalk.c
parent8480eef7ee0c8e52a8bf3ea12e5626009a966164 (diff)
downloadlibgit2-1aa21fe3b87a1e601023f49c41fab3ce76c189ac.tar.gz
Deprecate git_revparse_single and _rangelike
Diffstat (limited to 'src/revwalk.c')
-rw-r--r--src/revwalk.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/revwalk.c b/src/revwalk.c
index c1071843b..b22fef07f 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -231,25 +231,23 @@ int git_revwalk_push_ref(git_revwalk *walk, const char *refname)
int git_revwalk_push_range(git_revwalk *walk, const char *range)
{
- git_object *left, *right;
- int threedots;
+ git_oid left, right;
+ git_revparse_flag_t revparseflags;
int error = 0;
- if ((error = git_revparse_rangelike(&left, &right, &threedots, walk->repo, range)))
+ if ((error = git_revparse(&left, &right, &revparseflags, walk->repo, range)))
return error;
- if (threedots) {
+ if (revparseflags & GIT_REVPARSE_MERGE_BASE) {
/* TODO: support "<commit>...<commit>" */
giterr_set(GITERR_INVALID, "Symmetric differences not implemented in revwalk");
return GIT_EINVALIDSPEC;
}
- if ((error = push_commit(walk, git_object_id(left), 1)))
+ if ((error = push_commit(walk, &left, 1)))
goto out;
- error = push_commit(walk, git_object_id(right), 0);
+ error = push_commit(walk, &right, 0);
out:
- git_object_free(left);
- git_object_free(right);
return error;
}