diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2007-09-20 07:23:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-20 00:10:48 -0700 |
commit | 17ed158021ead9cb056f692fc35ff3fcde96a747 (patch) | |
tree | 6ccdca4a789bc9546632273b0449254af0550191 | |
parent | 077d6f72c7db84d2b6b3db879e3d68ab60482d43 (diff) | |
download | git-17ed158021ead9cb056f692fc35ff3fcde96a747.tar.gz git-17ed158021ead9cb056f692fc35ff3fcde96a747.tar.xz |
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>
-rw-r--r-- | builtin-rev-list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-rev-list.c b/builtin-rev-list.c index 899a31d09..389463399 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -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; |