Re: [PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 10:24:25PM +0200, Johannes Schindelin 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) > >

Re: [PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Junio C Hamano
Johannes Schindelin 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) >>

Re: [PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Johannes Schindelin
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

[PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Jeff King
When cherry-picking a single commit, we go through a special code path that avoids creating a sequencer todo list at all. This path expects our revision parsing to turn up exactly one commit, and dies with a BUG if it doesn't. But it's actually quite easy to fool. For example: $ git