From: Junio C Hamano Date: Tue, 22 Feb 2011 00:58:37 +0000 (-0800) Subject: rev-list: --left/right-only are mutually exclusive X-Git-Tag: v1.7.5-rc0~15^2~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=24852d917104e294726c54803d5c9012997506ca;p=git.git rev-list: --left/right-only are mutually exclusive Signed-off-by: Junio C Hamano --- 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;