git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pedro Larroy <pedro.larroy.lists@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git bisect should return 1 when the first bad commit is found
Date: Thu, 13 Jun 2019 11:22:48 -0700	[thread overview]
Message-ID: <xmqq5zp9wdjb.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAC_CU1iWBCTt5jLQ0Zp2HoyA0oFgG3shDB2rLfOsmC+x67NdAw@mail.gmail.com> (Pedro Larroy's message of "Wed, 12 Jun 2019 15:33:43 -0700")

Pedro Larroy <pedro.larroy.lists@gmail.com> writes:

> I'm using git bisect, and for complex reasons I can't use git bisect
> run to drive the bisection. I don't think git bisect bad/good is
> returning a different status code when the first bad commit is found
> and this would be very useful to stop the driver of the bisection.
>
> What do you think?  Would such a change be acceptable?

Probably not.

A non-zero exit code would indicate that "git bisect" had trouble
finding the next commit to check after being told 'good' (or 'bad'),
which you wouldn't be able to tell from your "first bad one is
found".

The 'first bad one' is not necessarily the HEAD when the bisect
procedure finds it, so you'd have to read and parse "x is the first
such commit" message anyway, no?  And once you start parsing the
message from 'git bisect', you should be able to tell between
"please try this one, you have approximately 7 steps left" and "we
found the first bad one, which is X", without relying on the exit
status, no?


  reply	other threads:[~2019-06-13 18:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 22:33 git bisect should return 1 when the first bad commit is found Pedro Larroy
2019-06-13 18:22 ` Junio C Hamano [this message]
2019-06-23 20:32   ` Pedro Larroy
2019-06-23 22:49     ` Jeff King
2019-06-24  7:16       ` Christian Couder
2019-06-25  4:58         ` Jeff King
2019-06-24 18:41       ` Junio C Hamano
2019-06-25  4:53         ` Jeff King
2019-06-25  5:13           ` 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=xmqq5zp9wdjb.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pedro.larroy.lists@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).