Git development
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: git@vger.kernel.org
Cc: torvalds@osdl.org, jon.seymour@gmail.com
Subject: [PATCH 5/8] Removes DEBUG code from rev-list.c and -DDEBUG from Makefile
Date: Fri, 01 Jul 2005 16:46:58 +1000	[thread overview]
Message-ID: <20050701064658.5149.qmail@blackcubes.dyndns.org> (raw)


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;
 }
------------

                 reply	other threads:[~2005-07-01  6:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050701064658.5149.qmail@blackcubes.dyndns.org \
    --to=jon.seymour@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox