From: Junio C Hamano <gitster@pobox.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: [PATCHv2 1/2] revlist.c: introduce --left/right-only for unsymmetric picking
Date: Mon, 21 Feb 2011 17:17:33 -0800 [thread overview]
Message-ID: <7vmxlog95e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vvd0cgahg.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Mon\, 21 Feb 2011 16\:48\:43 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> ... We
> might want to make sure that l/r only are mutually exclusive at the
> command parser, though.
-- >8 --
Subject: [PATCH] rev-list: --left/right-only are mutually exclusive
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
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.107.ga7184
next prev parent reply other threads:[~2011-02-22 1:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 12:34 [PATCH 1/3] revlist.c: introduce --cherry for unsymmetric picking Michael J Gruber
2011-02-18 12:34 ` [PATCH 2/3] t6007: Make sure we test --cherry-pick Michael J Gruber
2011-02-18 12:34 ` [PATCH 3/3] rev-list: documentation and test for --cherry Michael J Gruber
2011-02-18 19:42 ` [PATCH 1/3] revlist.c: introduce --cherry for unsymmetric picking Junio C Hamano
2011-02-19 14:47 ` Jay Soffian
2011-02-21 12:24 ` Michael J Gruber
2011-02-21 16:09 ` [PATCHv2 1/2] revlist.c: introduce --left/right-only " Michael J Gruber
2011-02-21 16:09 ` [PATCHv2 2/2] rev-list: documentation and test for --left/right-only Michael J Gruber
2011-02-21 17:37 ` Jay Soffian
2011-02-22 7:23 ` Michael J Gruber
2011-02-22 0:48 ` [PATCHv2 1/2] revlist.c: introduce --left/right-only for unsymmetric picking Junio C Hamano
2011-02-22 1:17 ` Junio C Hamano [this message]
2011-02-22 1:19 ` Junio C Hamano
2011-02-22 13:36 ` [PATCH (n+1)/n] t6007: test rev-list --cherry Michael J Gruber
2011-02-21 19:49 ` [PATCH 1/3] revlist.c: introduce --cherry for unsymmetric picking Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vmxlog95e.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).