git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] rev-list --bisect: Fix best == NULL case.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Sep 20, 2007, 05:23 UTC
Message-ID
<20070920072301.689b96c9.chriscool@tuxfamily.org>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 builtin-rev-list.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
 Not sure if the "if (best)" check is really needed, but it looks safer
 with this patch.
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 899a31d..3894633 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;
-- 
1.5.3.2.80.g077d6f
Next: Junio C Hamano
Message 1 of 3 in “rev-list --bisect: Fix best == NULL case.”
  1. rev-list --bisect: Fix best == NULL case.Christian Couder, Sep 20, 2007
  2. Junio C HamanoSep 20, 2007
  3. Junio C HamanoSep 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.