Re: [PATCH 1/2] rev-list: implement --bisect-all

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Tuesday, October 23, 2007 - 2:33 pm

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:


Still, it is good to prototype in the script while figuring out
what the desired behaviour is, I would say.

What I was hoping to see when I posted --bisect-all suggestion
was a bit different from what Christian did, by the way.

In addition to the bisect/skip-* that are filtered at the shell
level, if you feed the list of commits that cannot be tested to
the bisection plumbing, you can affect the way the resulting
list from the --bisect-all is sorted.

Suppose you have this (B is bad, G is good):

           o---.........---o---Y---o---o---B
          /                       /
     G---o---.........---o---Z---X

and one round of bisection picked X.  You find it untestable,
and Y and Z both bisects the remaining set equally well.  In
such a case, the current code sorts the resulting set, with Y
and Z next to each other (because they are both closest to the
midway), and the Porcelain filters out X which is better than Y
or Z.  You may end up picking Z.

Often, when X is not testable, neither is Z.  We would be better
off to avoid checking a commit close to what are known to be
untestable while there are other commits that are equally close
to the midway.

So instead of sorting the list solely based on the mid-ness like
the current code does (i.e. compare_commit_dist()), we can tweak
commits' mid-ness value (i.e. best_bisection_sorted() computes
it in distance variable) by penalizing it with the closeness of
the commit to known untestable commits.

Naively, "closeness" of commit Z to commit X can be defined as
something simple as "rev-list Z...X | wc -l".  The smaller the
number, the closer the commits.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] rev-list: implement --bisect-all, Christian Couder, (Sun Oct 7, 8:34 pm)
Re: [PATCH 1/2] rev-list: implement --bisect-all, Johannes Schindelin, (Sun Oct 7, 8:44 pm)
Re: [PATCH 1/2] rev-list: implement --bisect-all, Christian Couder, (Sun Oct 7, 10:08 pm)
Re: [PATCH 1/2] rev-list: implement --bisect-all, Johannes Schindelin, (Sun Oct 7, 10:08 pm)
Re: [PATCH 1/2] rev-list: implement --bisect-all, Junio C Hamano, (Tue Oct 23, 2:33 pm)