{"thread":{"id":"1086","subject":"[PATCH 7/8] Make O(n) algorithm the default implementation of --bisect [rev 2]","startedAt":"2005-07-02T05:38:12Z","lastAt":"2005-07-02T05:38:12Z","messageCount":1,"participants":["Jon Seymour"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"5559","messageId":"20050702053812.11560.qmail@blackcubes.dyndns.org","threadId":"1086","inReplyTo":null,"subject":"[PATCH 7/8] Make O(n) algorithm the default implementation of --bisect [rev 2]","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2005-07-02T05:38:12Z","receivedAt":"2005-07-02T05:38:12Z","isPatch":true,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"\nThis patch makes the O(n) the default implementation of the git-rev-list\n--bisect switch.\n\nThe original O(n^2) algorithm is still available as --bisect-orig.\n\nIt is left around to provide a quick and simple way to verify the\naccuracy of the O(n) algorithm.\n\nA subsequent patch is supplied to remove support for --bisect-orig\ncompletely.\n\nSigned-off: Jon Seymour <jon.seymour@gmail.com>\n---\nLinus: you may choose to defer application of this patch if you are\nnot confident that the O(n) algorithm is good.\n\n[rev 2]\n  * included necessary change to t/t6002... that was accidentally\n    ommitted on the first attempt.\n\nThe patch series to be applied is now:\n\n[PATCH 1/8] Factor out useful test case infrastructure from t/t6001... into t/t6000-lib.sh\n[PATCH 2/8] Introduce unit tests for git-rev-list --bisect\n[PATCH 3/8] Add a topological sort procedure to commit.c [rev 3]\n[PATCH 4/8] This patch introduces a O(n) bisection algorithm to git.\n[PATCH 5/8] Removes DEBUG code from rev-list.c and -DDEBUG from Makefile\n[PATCH 6/8] Move bisection algorithms into commit.c\n[PATCH 7/8] Make O(n) algorithm the default implementation of --bisect [rev 2]\n[PATCH 8/8] Removes support for O(n^2) algorithm from git-rev-list completely [rev 2]\n[PATCH] Change the sed seperator in t/t6000-lib.sh\n---\n\n rev-list.c                 |    5 +++--\n t/t6002-rev-list-bisect.sh |    2 +-\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\n203e690e7d7a2aa75f0336744dc6b4455ad51844\ndiff --git a/rev-list.c b/rev-list.c\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -16,6 +16,7 @@ static const char rev_list_usage[] =\n \t\t      \"  --min-age=epoch\\n\"\n \t\t      \"  --header\\n\"\n \t\t      \"  --pretty\\n\"\n+                      \"  --bisect\\n\"\n \t\t      \"  --merge-order [ --show-breaks ]\";\n \n static int bisect_list = 0;\n@@ -365,11 +366,11 @@ int main(int argc, char **argv)\n \t\t\tshow_parents = 1;\n \t\t\tcontinue;\n \t\t}\n-\t\tif (!strcmp(arg, \"--bisect-by-cut\")) {\n+\t\tif (!strcmp(arg, \"--bisect\")) {\n \t\t\tbisect_by_cut_option = 1;\n \t\t\tcontinue;\n \t\t}\n-\t\tif (!strcmp(arg, \"--bisect\")) {\n+\t\tif (!strcmp(arg, \"--bisect-orig\")) {\n \t\t\tbisect_list = 1;\n \t\t\tcontinue;\n \t\t}\ndiff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh\n--- a/t/t6002-rev-list-bisect.sh\n+++ b/t/t6002-rev-list-bisect.sh\n@@ -241,7 +241,7 @@ EOF\n }\n \n test_sequence \"--bisect\"\n-test_sequence \"--bisect-by-cut\"\n+test_sequence \"--bisect-orig\"\n \n #\n #\n------------\n"}]}