mirror of
https://github.com/git/git
synced 2024-09-13 21:34:42 +00:00
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. */
|
/* Do the real work of finding bisection commit. */
|
||||||
best = do_find_bisection(list, nr, weights);
|
best = do_find_bisection(list, nr, weights);
|
||||||
|
|
||||||
if (best)
|
if (best) {
|
||||||
best->next = NULL;
|
best->next = NULL;
|
||||||
|
*reaches = weight(best);
|
||||||
*reaches = weight(best);
|
}
|
||||||
free(weights);
|
free(weights);
|
||||||
|
|
||||||
return best;
|
return best;
|
||||||
|
|
Loading…
Reference in a new issue