git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jeff King <peff@peff.net>, Andrei Rybak <rybak.a.v@gmail.com>,
	git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 2/2] sequencer: don't say BUG on bogus input
Date: Mon, 09 Jul 2018 14:11:30 -0700	[thread overview]
Message-ID: <xmqqsh4sazct.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1807092222300.75@tvgsbejvaqbjf.bet> (Johannes Schindelin's message of "Mon, 9 Jul 2018 22:24:25 +0200 (DST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi Peff,
>
> On Mon, 9 Jul 2018, Jeff King wrote:
>
>> diff --git a/sequencer.c b/sequencer.c
>> index f692b2ef44..234666b980 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>> @@ -3637,7 +3637,7 @@ int sequencer_pick_revisions(struct replay_opts *opts)
>>  			return error(_("revision walk setup failed"));
>>  		cmit = get_revision(opts->revs);
>>  		if (!cmit || get_revision(opts->revs))
>> -			return error("BUG: expected exactly one commit from walk");
>> +			return error(_("empty commit set passed"));
>
> Should this not rather be
>
> -		if (!cmit || get_revision(opts->revs))
> -			return error("BUG: expected exactly one commit from walk");
> +		if (!cmit)
> +			return error(_("empty commit set passed"));
> +		if (get_revision(opts->revs))
> +			return error(_("unexpected extra commit from walk"));

Good eyes.

  reply	other threads:[~2018-07-09 21:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 14:16 [BUG] git cherry-pick does not complain about unknown options Andrei Rybak
2018-07-09 19:16 ` Jeff King
2018-07-09 19:46   ` [PATCH 0/2] de-confuse git cherry-pick --author behavior Jeff King
2018-07-09 19:48     ` [PATCH 1/2] sequencer: handle empty-set cases consistently Jeff King
2018-07-09 20:20       ` Junio C Hamano
2018-07-09 20:21       ` Johannes Schindelin
2018-07-09 19:49     ` [PATCH 2/2] sequencer: don't say BUG on bogus input Jeff King
2018-07-09 20:24       ` Johannes Schindelin
2018-07-09 21:11         ` Junio C Hamano [this message]
2018-07-10  2:15         ` Jeff King
2018-07-10  4:31           ` [PATCH v2 0/2] de-confuse git cherry-pick --author Jeff King
2018-07-10  4:31             ` [PATCH v2 1/2] sequencer: handle empty-set cases consistently Jeff King
2018-07-10  4:32             ` [PATCH v2 2/2] sequencer: don't say BUG on bogus input Jeff King
2018-07-11  8:58             ` [PATCH v2 0/2] de-confuse git cherry-pick --author Johannes Schindelin
2018-07-11 15:37               ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqsh4sazct.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=rybak.a.v@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).