aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-02-21 16:58:37 -0800
committerJunio C Hamano <gitster@pobox.com>2011-02-21 17:06:27 -0800
commit24852d917104e294726c54803d5c9012997506ca (patch)
treee8670207c18a832ceaaa2016896ad8d8ab8e19b7 /revision.c
parent59c8afdf475d2b072fb63383df9f62afd2b3b1ee (diff)
downloadgit-24852d917104e294726c54803d5c9012997506ca.tar.gz
git-24852d917104e294726c54803d5c9012997506ca.tar.xz
rev-list: --left/right-only are mutually exclusive
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 0681c7c30..1fcaeb790 100644
--- a/revision.c
+++ b/revision.c
@@ -1284,8 +1284,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--left-right")) {
revs->left_right = 1;
} else if (!strcmp(arg, "--left-only")) {
+ if (revs->right_only)
+ die("--left-only is incompatible with --right-only");
revs->left_only = 1;
} else if (!strcmp(arg, "--right-only")) {
+ if (revs->left_only)
+ die("--right-only is incompatible with --left-only");
revs->right_only = 1;
} else if (!strcmp(arg, "--count")) {
revs->count = 1;