Re: [PATCH v10.1 7/7] bisect: allow any terms set by user
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 27, 2015, 04:10 UTC
- Message-ID
- <CAP8UFD1PyS_qM3EHW_Nzmo=3aeTDkZ0M3hnhRQANAO+ShF3H1Q@mail.gmail.com>
- In-Reply-To
- <xmqqa8vmrtsh.fsf@gitster.dls.corp.google.com>
On Sat, Jun 27, 2015 at 12:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 25 quoted lines
> Matthieu Moy <Matthieu.Moy@imag.fr> writes: > >>> Matthieu Moy <Matthieu.Moy@imag.fr> writes: >>> >>>> + git bisect terms <term-old> <term-new> >>> >>> I think this is the other way around. >> >> Indeed. > > I hate to be saying this, but this is a strong indication that > consistency with "start $bad $good..." must be broken. If the > person who has been working on this topic for a few iterations in > the past few days cannot get it right, no ordinary user can. With > or without a mnemonic hint "N comes before O, so does B before G". > > Of course we cannot just say "git bisect terms old new". That would > only invite "eh, I do not remember, which between terms and start > take the old one first?" without helping people. > > The best I can come up with is to forbid positional arguments to > this subcommand and always require them to be given like so: > > git bisect terms --old=fast --new=slow > git bisect terms --new=slow --old=fast
If we don't want to support positional arguments, then I would suggest supporting first the following instead:
git bisect terms --name-good=fast --name-bad=slow
git bisect terms --name-bad=slow --name-good=fastThis would make the interface consistent with the code.
Of course we could also accept --name-old and --name-new as synonyms for --name-good and --name-bad.
> We may want to start supporting > > git bisect start --new=master --old=maint
Maybe we could also support:
git bisect start --name-good=fast --name-bad=slow --fast=maint --slow=master