rev-list --bisect: Fix best == NULL case.
Earlier commit ce0cbad77
broke rev-list --bisect to cause it
segfault when the resulting set is empty.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
077d6f72c7
commit
17ed158021
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user