Skip to content

Commit

Permalink
rev-list: --left/right-only are mutually exclusive
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Feb 22, 2011
1 parent 59c8afd commit 24852d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 24852d9

Please sign in to comment.