Git development
 help / color / mirror / Atom feed
* [PATCH] Removes DEBUG code from rev-list.c and -DDEBUG from Makefile
@ 2005-07-01  6:31 Jon Seymour
  0 siblings, 0 replies; only message in thread
From: Jon Seymour @ 2005-07-01  6:31 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


This patch removes DEBUG code and -DDEBUG flag from Makefile.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---

 Makefile   |    2 +-
 rev-list.c |   30 ------------------------------
 2 files changed, 1 insertions(+), 31 deletions(-)

be52c026e003b9774acc3d0f53ae5ed67d878b03
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@
 # break unless your underlying filesystem supports those sub-second times
 # (my ext3 doesn't).
 COPTS=-O2
-CFLAGS=-DDEBUG -g $(COPTS) -Wall
+CFLAGS=-g $(COPTS) -Wall
 
 prefix=$(HOME)
 bin=$(prefix)/bin
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -44,10 +44,6 @@ static int merge_order = 0;
 static int show_breaks = 0;
 static int stop_traversal = 0;
 static int bisect_by_cut_option = 0;
-#ifdef DEBUG
-static int debug = 0;
-static unsigned int complexity = 0;
-#endif
 
 static void show_commit(struct commit *commit)
 {
@@ -283,9 +279,6 @@ static int count_distance(struct commit_
 
 static void clear_distance(struct commit_list *list)
 {
-#ifdef DEBUG
-	complexity++;
-#endif
 	while (list) {
 		struct commit *commit = list->item;
 		commit->object.flags &= ~COUNTED;
@@ -422,14 +415,6 @@ static inline struct bisect_by_cut_node 
 	return (struct bisect_by_cut_node *)commit->object.util;
 }
 
-#ifdef DEBUG
-static void print_bisect_by_cut_node(struct commit * commit, const char * prefix)
-{
-	struct bisect_by_cut_node * node = get_bisect_by_cut_node(commit);
-	fprintf(stderr, "%s%s %u %d\n", prefix, sha1_to_hex(commit->object.sha1), node->flags, node->count);
-}
-#endif
-
 /*
  * Find the best bisection point by cutting a topological order in two then
  * identifying a set of boundary nodes with a reachability known to be 
@@ -558,11 +543,6 @@ struct commit * bisect_by_cut(struct com
 			best = work_item;
 			fittest = fitness;
 		}
-#ifdef DEBUG
-		if (debug) {
-			print_bisect_by_cut_node(work_item, "work ");
-		}
-#endif
 		if (goal_test < goal) {
 			while (children) {
 				struct bisect_by_cut_node * cn 
@@ -666,12 +646,6 @@ int main(int argc, char **argv)
 			show_breaks = 1;
 			continue;
 		}
-#ifdef DEBUG
-		if (!strcmp(arg, "--debug")) {
-			debug = 1;
-			continue;
-		}
-#endif
 		flags = 0;
 		if (*arg == '^') {
 			flags = UNINTERESTING;
@@ -700,9 +674,5 @@ int main(int argc, char **argv)
 			  die("merge order sort failed\n");
 		}
 	}
-#ifdef DEBUG
-	if (debug) 
-		fprintf(stderr, "complexity=%d\n", complexity);
-#endif
 	return 0;
 }
------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-01  6:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-01  6:31 [PATCH] Removes DEBUG code from rev-list.c and -DDEBUG from Makefile Jon Seymour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox