git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Pedro Larroy <pedro.larroy.lists@gmail.com>, git@vger.kernel.org
Subject: Re: git bisect should return 1 when the first bad commit is found
Date: Mon, 24 Jun 2019 11:41:53 -0700	[thread overview]
Message-ID: <xmqqo92mhlla.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190623224935.GD1100@sigill.intra.peff.net> (Jeff King's message of "Sun, 23 Jun 2019 18:49:35 -0400")

Jeff King <peff@peff.net> writes:

> On Sun, Jun 23, 2019 at 01:32:16PM -0700, Pedro Larroy wrote:
>
>> Thanks for your answer.
>> 
>> I was expecting the HEAD to point to the first bad commit.
>> 
>> In mercurial, the exit status tells you information about the
>> bisection process:  https://www.mercurial-scm.org/repo/hg/help/bisect
>> 
>> Sure one can parse stdout, it's just more tedious than just checking
>> the return code and having the HEAD left to the original bad commit.
>
> I think it might be nice for Git to write a well-known refname (like
> BISECT_RESULT or similar) so that you can refer to that instead of
> having to read stdout (whether by machine or by a user
> cutting-and-pasting). And I cannot offhand think of a particular reason
> why that could not just be HEAD (instead of something bisect-specific)
> after the bisect finishes.

As Christian downthread reminds us, that is what the bisect/bad ref
is (which I totally forgot when I gave the earlier response).  I do
not think we need a new ref, but I do not think it is so bad to add
an option "git bisect --exit-code ( --good | --bad ) [<commit-ish>]"
that makes the command usually exit with non-zero status.  Unless we
have found the final answer successfully, that is, and in that case
the command would exit with 0 status to signall "all done".

But that should be an option.

  parent reply	other threads:[~2019-06-24 18:42 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
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 [this message]
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=xmqqo92mhlla.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pedro.larroy.lists@gmail.com \
    --cc=peff@peff.net \
    /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).