Re: [PATCH v9 4/5] bisect: add the terms old/new

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 25, 2015 at 8:50 PM, Matthieu Moy <Matthieu.Moy@xxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]