Re: [PATCH 2/2] sequencer: don't say BUG on bogus input
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 9, 2018, 20:24 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1807092222300.75@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20180709194912.GB7980@sigill.intra.peff.net>
Hi Peff,
On Mon, 9 Jul 2018, Jeff King wrote:
Show 10 quoted lines
> 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"));
Ciao, Dscho