On Thu, Jun 25, 2015 at 8:50 PM, Matthieu Moy <matthieu....@imag.fr> wrote:

[...]

> @@ -178,7 +183,7 @@ bisect_start() {
>         } &&
>         git rev-parse --sq-quote "$@" >"$GIT_DIR/BISECT_NAMES" &&
>         eval "$eval true" &&
> -       if test $revision_seen -eq 1 && test ! -s "$GIT_DIR/BISECT_TERMS"
> +       if test $must_write_terms -eq 1 && test ! -s "$GIT_DIR/BISECT_TERMS"
>         then
>                 echo "$NAME_BAD" >"$GIT_DIR/BISECT_TERMS" &&
>                 echo "$NAME_GOOD" >>"$GIT_DIR/BISECT_TERMS"

You are writing BISECT_TERMS here...

> @@ -543,14 +548,22 @@ check_and_set_terms () {
>                         fi
>                         NAME_BAD="bad"
>                         NAME_GOOD="good" ;;
> +               new|old)
> +                       if ! test -s "$GIT_DIR/BISECT_TERMS"
> +                       then
> +                               echo "new" >"$GIT_DIR/BISECT_TERMS" &&
> +                               echo "old" >>"$GIT_DIR/BISECT_TERMS"
> +                       fi
> +                       NAME_BAD="new"
> +                       NAME_GOOD="old" ;;

...and here nearly in the same way.

So perhaps you could use a function like:

write_bisect_terms() {
      if test ! -s "$GIT_DIR/BISECT_TERMS"
      then
            echo "$NAME_BAD" >"$GIT_DIR/BISECT_TERMS" &&
            echo "$NAME_GOOD" >>"$GIT_DIR/BISECT_TERMS"
      fi
}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to