From: Michael J Gruber Date: Thu, 10 Mar 2011 14:44:57 GMT Subject: [PATCHv3 04/10] rev-list: --left/right-only are mutually exclusive Message-ID: <24852d917104e294726c54803d5c9012997506ca.1299767412.git.git@drmicha.warpmail.net> In-Reply-To: <4D78AC8B.7010308@drmicha.warpmail.net> From: Junio C Hamano Signed-off-by: Junio C Hamano --- revision.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/revision.c b/revision.c index 0681c7c..1fcaeb7 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; -- 1.7.4.1.317.gf445f