{"thread":{"id":"1076","subject":"[PATCH 5/8] Removes DEBUG code from rev-list.c and -DDEBUG from Makefile","startedAt":"2005-07-01T06:46:58Z","lastAt":"2005-07-01T06:46:58Z","messageCount":1,"participants":["Jon Seymour"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"5518","messageId":"20050701064658.5149.qmail@blackcubes.dyndns.org","threadId":"1076","inReplyTo":null,"subject":"[PATCH 5/8] Removes DEBUG code from rev-list.c and -DDEBUG from Makefile","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2005-07-01T06:46:58Z","receivedAt":"2005-07-01T06:46:58Z","isPatch":true,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"\nThis patch removes DEBUG code and -DDEBUG flag from Makefile.\n\nSigned-off-by: Jon Seymour <jon.seymour@gmail.com>\n---\n\n Makefile   |    2 +-\n rev-list.c |   30 ------------------------------\n 2 files changed, 1 insertions(+), 31 deletions(-)\n\nbe52c026e003b9774acc3d0f53ae5ed67d878b03\ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -10,7 +10,7 @@\n # break unless your underlying filesystem supports those sub-second times\n # (my ext3 doesn't).\n COPTS=-O2\n-CFLAGS=-DDEBUG -g $(COPTS) -Wall\n+CFLAGS=-g $(COPTS) -Wall\n \n prefix=$(HOME)\n bin=$(prefix)/bin\ndiff --git a/rev-list.c b/rev-list.c\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -44,10 +44,6 @@ static int merge_order = 0;\n static int show_breaks = 0;\n static int stop_traversal = 0;\n static int bisect_by_cut_option = 0;\n-#ifdef DEBUG\n-static int debug = 0;\n-static unsigned int complexity = 0;\n-#endif\n \n static void show_commit(struct commit *commit)\n {\n@@ -283,9 +279,6 @@ static int count_distance(struct commit_\n \n static void clear_distance(struct commit_list *list)\n {\n-#ifdef DEBUG\n-\tcomplexity++;\n-#endif\n \twhile (list) {\n \t\tstruct commit *commit = list->item;\n \t\tcommit->object.flags &= ~COUNTED;\n@@ -422,14 +415,6 @@ static inline struct bisect_by_cut_node \n \treturn (struct bisect_by_cut_node *)commit->object.util;\n }\n \n-#ifdef DEBUG\n-static void print_bisect_by_cut_node(struct commit * commit, const char * prefix)\n-{\n-\tstruct bisect_by_cut_node * node = get_bisect_by_cut_node(commit);\n-\tfprintf(stderr, \"%s%s %u %d\\n\", prefix, sha1_to_hex(commit->object.sha1), node->flags, node->count);\n-}\n-#endif\n-\n /*\n  * Find the best bisection point by cutting a topological order in two then\n  * identifying a set of boundary nodes with a reachability known to be \n@@ -558,11 +543,6 @@ struct commit * bisect_by_cut(struct com\n \t\t\tbest = work_item;\n \t\t\tfittest = fitness;\n \t\t}\n-#ifdef DEBUG\n-\t\tif (debug) {\n-\t\t\tprint_bisect_by_cut_node(work_item, \"work \");\n-\t\t}\n-#endif\n \t\tif (goal_test < goal) {\n \t\t\twhile (children) {\n \t\t\t\tstruct bisect_by_cut_node * cn \n@@ -666,12 +646,6 @@ int main(int argc, char **argv)\n \t\t\tshow_breaks = 1;\n \t\t\tcontinue;\n \t\t}\n-#ifdef DEBUG\n-\t\tif (!strcmp(arg, \"--debug\")) {\n-\t\t\tdebug = 1;\n-\t\t\tcontinue;\n-\t\t}\n-#endif\n \t\tflags = 0;\n \t\tif (*arg == '^') {\n \t\t\tflags = UNINTERESTING;\n@@ -700,9 +674,5 @@ int main(int argc, char **argv)\n \t\t\t  die(\"merge order sort failed\\n\");\n \t\t}\n \t}\n-#ifdef DEBUG\n-\tif (debug) \n-\t\tfprintf(stderr, \"complexity=%d\\n\", complexity);\n-#endif\n \treturn 0;\n }\n------------\n"}]}