On Tue, 18 Nov 2014, Jonathan Nieder wrote: > Hi, > > Alan Stern wrote: > > > The "git rev-list A ^B" command lists all the commits that are > > reachable from A but not from B. Is there a comparable command for the > > converse relation, that is, a command to list all the commits that A is > > reachable from but B isn't? > > > > And if there is such a command, can the output be limited to just the > > latest commits? That is, list commit X if and only if A is reachable > > from X, B isn't reachable from X, and B is reachable from each of X's > > children? > > Someone else can answer your direct question, but you've got my > curiosity. What is the application? Tracking down regressions. Bisection isn't perfect. Suppose a bisection run ends up saying that B is the first bad commit. It's easy enough to build B and test it, to verify that it really is bad. But to be sure that B introduced the fault, it would help to find the latest commit that doesn't include B's changes -- that is, the latest commit that B isn't reachable from (or the maximal elements in the set of all such commits). This is also important in cases where there are multiple bugs and you want to investigate only the commits that don't include one of the bugs. Alan Stern -- 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