git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, antoine.delaite@ensimag.grenoble-inp.fr,
	louis--alexandre.stuber@ensimag.grenoble-inp.fr,
	chriscool@tuxfamily.org, thomasxnguy@gmail.com,
	valentinduperray@gmail.com,
	Louis Stuber <stuberl@ensimag.grenoble-inp.fr>
Subject: Re: [PATCH v9 5/5] bisect: allow any terms set by user
Date: Fri, 26 Jun 2015 10:20:00 +0200	[thread overview]
Message-ID: <vpqegkyyj7z.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqfv5fwib3.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 25 Jun 2015 15:10:24 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> The second sentence may want to be something like
>
> 	If you mistyped one of the terms, you can do another "git
> 	bisect terms <term-new> <term-old>" to correct them, but
> 	that is possible only before you start the bisection.

Applied, thanks.

I currently have this in addition to v9 in my branch. I'll resend later
(https://github.com/moy/git/tree/bisect-terms is up to date).

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index e783f87..7609cd6 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -143,19 +143,19 @@ set your own terms.
 git bisect terms <term-new> <term-old>
 ------------------------------------------------
 
-This command has to be used before a bisection has started. <term-old>
-must be associated with the latest revisions and <term-new> with the
-ancestors of <term-old>. For example, if something was buggy in the
+This command has to be used before a bisection has started. <term-new>
+must be associated with the latest revisions and <term-old> with some
+ancestors of <term-new>. For example, if something was buggy in the
 old part of the history, you know somewhere the bug was fixed, and you
 want to find the exact commit that fixed it, you may want to say `git
-bisect terms fixed broken`; this way, you would mark a commit that
+bisect terms broken fixed`; this way, you would mark a commit that
 still has the bug with `broken`, and a newer one after the fix with
 `fixed`.
 
-Only the first bisection following the `git bisect terms` will use the
+Only the bisection following the `git bisect terms` will use the
 terms. If you mistyped one of the terms you can do again `git bisect
-terms <term-old> <term-new>`.
-
+terms <term-new> <term-old>`, but that is possible only before you
+start the bisection.
 
 Bisect visualize
 ~~~~~~~~~~~~~~~~
diff --git a/git-bisect.sh b/git-bisect.sh
index 8fee712..07c64d9 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -549,6 +549,20 @@ get_terms () {
        fi
 }
 
+write_terms () {
+       NAME_BAD=$1
+       NAME_GOOD=$2
+       check_term_format "$NAME_BAD"
+       check_term_format "$NAME_GOOD"
+       printf '%s\n%s\n' "$NAME_BAD" "$NAME_GOOD" >"$GIT_DIR/BISECT_TERMS"
+}
+
+check_term_format () {
+       term=$1
+       git check-ref-format refs/bisect/"$term" ||
+       die "$(eval_gettext "'\$term' is not a valid term")"
+}
+
 check_and_set_terms () {
        cmd="$1"
        case "$cmd" in
@@ -579,8 +593,8 @@ check_and_set_terms () {
 
 bisect_voc () {
        case "$1" in
-       bad) echo "bad|old" ;;
-       good) echo "good|new" ;;
+       bad) echo "bad|new" ;;
+       good) echo "good|old" ;;
        esac
 }
 
@@ -611,20 +625,6 @@ Otherwise, to start a new bisection with new terms, please use
        esac
 }
 
-write_terms () {
-       NAME_BAD=$1
-       NAME_GOOD=$2
-       check_term_format "$NAME_BAD"
-       check_term_format "$NAME_GOOD"
-       printf '%s\n%s\n' "$NAME_BAD" "$NAME_GOOD" >"$GIT_DIR/BISECT_TERMS"
-}
-
-check_term_format () {
-       term=$1
-       git check-ref-format refs/bisect/"$term" ||
-       die "$(eval_gettext "'\$term' is not a valid term")"
-}
-
 case "$#" in
 0)
        usage ;;

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2015-06-26  8:20 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 21:00 [PATCH v3 1/6] bisect: correction of typo Antoine Delaite
2015-06-22 21:00 ` [PATCH v3 2/6] bisect: replace hardcoded "bad|good" by variables Antoine Delaite
2015-06-22 21:00 ` [PATCH v3 3/6] bisect: simplify the addition of new bisect terms Antoine Delaite
2015-06-22 21:00 ` [PATCH v3 4/6] bisect: add the terms old/new Antoine Delaite
2015-06-22 21:00 ` [PATCH v3 5/6] revision: fix rev-list --bisect in old/new mode Antoine Delaite
2015-06-22 21:00 ` [PATCH v3 6/6] bisect: allows any terms set by user Antoine Delaite
2015-06-23 12:54 ` [PATCH v7 0/5] git bisect old/new Matthieu Moy
2015-06-23 12:54   ` [PATCH v7 1/5] bisect: correction of typo Matthieu Moy
2015-06-23 12:54   ` [PATCH v7 2/5] bisect: replace hardcoded "bad|good" by variables Matthieu Moy
2015-06-23 12:54   ` [PATCH v7 3/5] bisect: simplify the addition of new bisect terms Matthieu Moy
2015-06-23 17:49     ` Eric Sunshine
2015-06-23 18:18       ` Matthieu Moy
2015-06-23 12:54   ` [PATCH v7 4/5] bisect: add the terms old/new Matthieu Moy
2015-06-23 19:27     ` Remi Galan Alfonso
2015-06-23 20:26       ` Matthieu Moy
2015-06-23 12:54   ` [PATCH v7 5/5] bisect: allows any terms set by user Matthieu Moy
2015-06-23 18:48     ` Junio C Hamano
2015-06-23 19:04   ` [PATCH v7 0/5] git bisect old/new Junio C Hamano
2015-06-23 20:16     ` Matthieu Moy
2015-06-23 20:34       ` Junio C Hamano
2015-06-24 15:17   ` [PATCH v8 0/5] Bisect terms Matthieu Moy
2015-06-24 15:17     ` [PATCH v8 1/5] bisect: correction of typo Matthieu Moy
2015-06-24 15:17     ` [PATCH v8 2/5] bisect: replace hardcoded "bad|good" by variables Matthieu Moy
2015-06-24 15:17     ` [PATCH v8 3/5] bisect: simplify the addition of new bisect terms Matthieu Moy
2015-06-24 17:29       ` Junio C Hamano
2015-06-24 21:26         ` Matthieu Moy
2015-06-24 15:17     ` [PATCH v8 4/5] bisect: add the terms old/new Matthieu Moy
2015-06-24 15:17     ` [PATCH v8 5/5] bisect: allow any terms set by user Matthieu Moy
2015-06-24 17:46       ` Junio C Hamano
2015-06-24 21:23         ` Matthieu Moy
2015-06-24 17:27     ` [PATCH v8 0/5] Bisect terms Junio C Hamano
2015-06-24 19:41     ` Junio C Hamano
2015-06-25 18:50   ` [PATCH v9 0/5] bisect terms Matthieu Moy
2015-06-25 18:50     ` [PATCH v9 1/5] bisect: correction of typo Matthieu Moy
2015-06-25 18:50     ` [PATCH v9 2/5] bisect: replace hardcoded "bad|good" by variables Matthieu Moy
2015-06-25 18:50     ` [PATCH v9 3/5] bisect: simplify the addition of new bisect terms Matthieu Moy
2015-06-25 18:50     ` [PATCH v9 4/5] bisect: add the terms old/new Matthieu Moy
2015-06-26  4:11       ` Christian Couder
2015-06-26  7:00         ` Matthieu Moy
2015-06-25 18:50     ` [PATCH v9 5/5] bisect: allow any terms set by user Matthieu Moy
2015-06-25 21:41       ` Junio C Hamano
2015-06-25 22:10         ` Junio C Hamano
2015-06-26  8:20           ` Matthieu Moy [this message]
2015-06-26 16:48             ` Junio C Hamano
2015-06-26 17:08               ` Matthieu Moy
2015-06-26 18:08                 ` Junio C Hamano
2015-06-26 20:18                   ` Matthieu Moy
2015-06-26  6:59         ` Matthieu Moy

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=vpqegkyyj7z.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=antoine.delaite@ensimag.grenoble-inp.fr \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=louis--alexandre.stuber@ensimag.grenoble-inp.fr \
    --cc=stuberl@ensimag.grenoble-inp.fr \
    --cc=thomasxnguy@gmail.com \
    --cc=valentinduperray@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).