From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Junio Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH 6/7] Bisect: factorise "bisect_{bad,good,dunno}" into "bisect_state".
Date: Sun, 14 Oct 2007 17:15:09 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0710141710230.25221@racer.site> (raw)
In-Reply-To: <20071014143003.23ae649f.chriscool@tuxfamily.org>
Hi,
On Sun, 14 Oct 2007, Christian Couder wrote:
> -bisect_bad() {
> +bisect_state() {
> bisect_autostart
> - case "$#" in
> - 0)
> - rev=$(git rev-parse --verify HEAD) ;;
> - 1)
> - rev=$(git rev-parse --verify "$1^{commit}") ;;
> + state=$1
> + case "$#,$state" in
> + 0,*)
> + die "Please call 'bisect_state' with at least one argument." ;;
> + 1,bad|1,good|1,dunno)
> + rev=$(git rev-parse --verify HEAD) ||
> + die "Bad rev input: HEAD"
> + bisect_write "$state" "$rev" ;;
> + 2,bad)
> + rev=$(git rev-parse --verify "$2^{commit}") ||
> + die "Bad rev input: $2"
> + bisect_write "$state" "$rev" ;;
Really? As far as I see, "2,bad" is an error in the current bisect.
> @@ -404,17 +390,15 @@ bisect_run () {
> exit $res
> fi
>
> - # Use "bisect_good" or "bisect_bad"
> - # depending on run success or failure.
> + # Find current state depending on run success or failure.
> if [ $res -gt 0 ]; then
> - next_bisect='bisect_bad'
> + state='bad'
> else
> - next_bisect='bisect_good'
> + state='good'
> fi
Maybe it is time to have a special exit status for "dunno"? But this is
not something to fix in your patch, just an idea for a future patch.
Ciao,
Dscho
next prev parent reply other threads:[~2007-10-14 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-14 12:30 [PATCH 6/7] Bisect: factorise "bisect_{bad,good,dunno}" into "bisect_state" Christian Couder
2007-10-14 16:15 ` Johannes Schindelin [this message]
2007-10-15 3:42 ` Christian Couder
2007-10-15 12:38 ` Johannes Schindelin
2007-10-16 6:28 ` Christian Couder
2007-10-16 11:20 ` Johannes Schindelin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0710141710230.25221@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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.
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 NNTP newsgroup(s).