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

[PATCH] Make O(n) algorithm the default implementation of --bisect

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jul 1, 2005, 06:31 UTC
Message-ID
<20050701063116.1156.qmail@blackcubes.dyndns.org>

This patch makes the O(n) the default implementation of the git-rev-list --bisect switch.

The original O(n^2) algorithm is still available as --bisect-orig.

It is left around to provide a quick and simple way to verify the accuracy of the O(n) algorithm.

A subsequent patch is supplied to remove support for --bisect-orig completely.

Signed-off: Jon Seymour <jon.seymour@gmail.com>
---
Linus: you may choose to defer application of this patch if you are
not confident that the O(n) algorithm is good.
---
 rev-list.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
342b91442a303b222f1601ef34ef37fffe5a9d57
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -16,6 +16,7 @@ static const char rev_list_usage[] =
 		      "  --min-age=epoch\n"
 		      "  --header\n"
 		      "  --pretty\n"
+                      "  --bisect\n"
 		      "  --merge-order [ --show-breaks ]";
 
 static int bisect_list = 0;
@@ -365,11 +366,11 @@ int main(int argc, char **argv)
 			show_parents = 1;
 			continue;
 		}
-		if (!strcmp(arg, "--bisect-by-cut")) {
+		if (!strcmp(arg, "--bisect")) {
 			bisect_by_cut_option = 1;
 			continue;
 		}
-		if (!strcmp(arg, "--bisect")) {
+		if (!strcmp(arg, "--bisect-orig")) {
 			bisect_list = 1;
 			continue;
 		}
------------
Message 1 of 1 in “Make O(n) algorithm the default implementation of --bisect”
  1. Make O(n) algorithm the default implementation of --bisectJon Seymour, Jul 1, 2005

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.