git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Bisect: add checks at the beginning of "git bisect run".

From
Christian Couder <chriscool@tuxfamily.org>
Date
Mar 27, 2007, 07:15 UTC
Message-ID
<200703270915.12408.chriscool@tuxfamily.org>
In-Reply-To
<7vzm5zs1aq.fsf@assigned-by-dhcp.cox.net>
Le mardi 27 mars 2007 07:28, Junio C Hamano a écrit :
Show 14 quoted lines
> Christian Couder <chriscool@tuxfamily.org> writes:
> >
> >  bisect_run () {
> > +    # Check that we have everything to run correctly.
> > +    test -d "$GIT_DIR/refs/bisect" || {
> > +	echo >&2 'You need to start by "git bisect start".'
> > +	echo >&2 'And then by "git bisect bad" and "git bisect good".'
> > +	exit 1
> > +    }
> > +    bisect_next_check fail
> > +
>
> I think you shouldn't need the first "test -d blah"; doesn't
> "bisect_next_check fail" already give that message?

Without the first "test -d blah", if "bisect start" was not already used, then the user will only see :

'You need to give me at least one good and one bad revisions.'

And then when using "git bisect good" or "git bisect bad" to give good or bad revision:

'You need to start by "git bisect start" Do you want me to do it for you [Y/n]?'

So I thought that it would be better to tell the user upfront everything that should be done.

But it's up to you.

Thanks, Christian.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 13 in “Bisect: add checks at the beginning of "git bisect run".”
  1. Bisect: add checks at the beginning of "git bisect run".Christian Couder, Mar 27, 2007
  2. Junio C HamanoMar 27, 2007
  3. Christian CouderMar 27, 2007
  4. Junio C HamanoMar 27, 2007
  5. Junio C HamanoMar 27, 2007
  6. Christian CouderMar 28, 2007
  7. Junio C HamanoMar 28, 2007
  8. Christian CouderMar 28, 2007
  9. Junio C HamanoMar 28, 2007
  10. Christian CouderMar 29, 2007
  11. Junio C HamanoMar 29, 2007
  12. Christian CouderApr 5, 2007
  13. Christian CouderApr 5, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.