summaryrefslogtreecommitdiff
path: root/src/revwalk.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-15 23:32:40 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-15 23:32:40 +0200
commit36c2dfed696f80a20ca1352f32ec8b136b800c30 (patch)
tree99faf618d89ca3ee182331449df9ee5fd4b3c2f8 /src/revwalk.c
parentd064c74794f51e759cd84648f84f2609d3283ecc (diff)
downloadlibgit2-36c2dfed696f80a20ca1352f32ec8b136b800c30.tar.gz
Is this crazy?
Diffstat (limited to 'src/revwalk.c')
-rw-r--r--src/revwalk.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/revwalk.c b/src/revwalk.c
index 05e99c0b6..9e32198fc 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -231,25 +231,26 @@ 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;
- git_revparse_flag_t revparseflags;
+ git_revision revision;
int error = 0;
- if ((error = git_revparse(&left, &right, &revparseflags, walk->repo, range)))
+ if ((error = git_revparse(&revision, walk->repo, range)))
return error;
- if (revparseflags & GIT_REVPARSE_MERGE_BASE) {
+
+ if (revision.flags & 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, git_object_id(revision.from), 1)))
goto out;
- error = push_commit(walk, git_object_id(right), 0);
- out:
- git_object_free(left);
- git_object_free(right);
+ error = push_commit(walk, git_object_id(revision.to), 0);
+
+out:
+ git_object_free(revision.from);
+ git_object_free(revision.to);
return error;
}