summaryrefslogtreecommitdiff
path: root/src/revwalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revwalk.c')
-rw-r--r--src/revwalk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/revwalk.c b/src/revwalk.c
index 6d12d34eb..9428cc6c0 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -194,6 +194,12 @@ int git_revwalk_push_range(git_revwalk *walk, const char *range)
if ((error = git_revparse(&revspec, walk->repo, range)))
return error;
+ if (!revspec.to) {
+ git_error_set(GIT_ERROR_INVALID, "invalid revspec. Only range supported.");
+ error = GIT_EINVALIDSPEC;
+ goto out;
+ }
+
if (revspec.flags & GIT_REVPARSE_MERGE_BASE) {
/* TODO: support "<commit>...<commit>" */
git_error_set(GIT_ERROR_INVALID, "symmetric differences not implemented in revwalk");