Make for-each-ref allow atom names like "<name>:<something>"
[gitweb.git] / builtin-rev-list.c
index 899a31d09ac31aaf1336b5ab3959345ac83a9579..38946339999e4e136b898b8f314e27d22ec1decb 100644 (file)
@@ -436,10 +436,10 @@ static struct commit_list *find_bisection(struct commit_list *list,
        /* Do the real work of finding bisection commit. */
        best = do_find_bisection(list, nr, weights);
 
-       if (best)
+       if (best) {
                best->next = NULL;
-
-       *reaches = weight(best);
+               *reaches = weight(best);
+       }
        free(weights);
 
        return best;