revision walker: mini clean-up
[gitweb.git] / builtin-rev-list.c
index 697046723fc64f38ab4fb589c84f1c5d5934894a..2dec8873f8a480898c993722ef8d12aec7906d25 100644 (file)
@@ -142,7 +142,7 @@ static int count_distance(struct commit_list *entry)
 
                if (commit->object.flags & (UNINTERESTING | COUNTED))
                        break;
-               if (!revs.prune_fn || (commit->object.flags & TREECHANGE))
+               if (commit->object.flags & TREECHANGE)
                        nr++;
                commit->object.flags |= COUNTED;
                p = commit->parents;
@@ -198,7 +198,7 @@ static inline int halfway(struct commit_list *p, int nr)
        /*
         * Don't short-cut something we are not going to return!
         */
-       if (revs.prune_fn && !(p->item->object.flags & TREECHANGE))
+       if (!(p->item->object.flags & TREECHANGE))
                return 0;
        if (DEBUG_BISECT)
                return 0;
@@ -268,7 +268,7 @@ static struct commit_list *best_bisection(struct commit_list *list, int nr)
                int distance;
                unsigned flags = p->item->object.flags;
 
-               if (revs.prune_fn && !(flags & TREECHANGE))
+               if (!(flags & TREECHANGE))
                        continue;
                distance = weight(p);
                if (nr - distance < distance)
@@ -308,7 +308,7 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
                int distance;
                unsigned flags = p->item->object.flags;
 
-               if (revs.prune_fn && !(flags & TREECHANGE))
+               if (!(flags & TREECHANGE))
                        continue;
                distance = weight(p);
                if (nr - distance < distance)
@@ -362,7 +362,7 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
                p->item->util = &weights[n++];
                switch (count_interesting_parents(commit)) {
                case 0:
-                       if (!revs.prune_fn || (flags & TREECHANGE)) {
+                       if (flags & TREECHANGE) {
                                weight_set(p, 1);
                                counted++;
                                show_list("bisection 2 count one",
@@ -435,7 +435,7 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
                         * add one for p itself if p is to be counted,
                         * otherwise inherit it from q directly.
                         */
-                       if (!revs.prune_fn || (flags & TREECHANGE)) {
+                       if (flags & TREECHANGE) {
                                weight_set(p, weight(q)+1);
                                counted++;
                                show_list("bisection 2 count one",
@@ -482,7 +482,7 @@ static struct commit_list *find_bisection(struct commit_list *list,
                        continue;
                p->next = last;
                last = p;
-               if (!revs.prune_fn || (flags & TREECHANGE))
+               if (flags & TREECHANGE)
                        nr++;
                on_list++;
        }