aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-05 01:13:36 -0700
committerJunio C Hamano <junkio@cox.net>2005-09-10 18:27:42 -0700
commit2ab706a38fbe6f4adb2fd09806a5d5faf33d355f (patch)
tree5d3321a142723094aec674548fb45229199e05ae
parent3d89cb4f3f5333d5eb5899352566ad071dbd0d0c (diff)
downloadgit-2ab706a38fbe6f4adb2fd09806a5d5faf33d355f.tar.gz
git-2ab706a38fbe6f4adb2fd09806a5d5faf33d355f.tar.xz
[PATCH] Disable debugging from read-tree.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--read-tree.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/read-tree.c b/read-tree.c
index 0241c9c6f..fed2a3c54 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -47,6 +47,8 @@ static int entcmp(char *name1, int dir1, char *name2, int dir2)
return ret;
}
+#define DBRT_DEBUG 0
+
static int unpack_trees_rec(struct tree_entry_list **posns, int len,
const char *base, merge_fn_t fn, int *indpos)
{
@@ -99,13 +101,16 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
}
}
+#if DBRT_DEBUG
if (first)
printf("index %s\n", first);
-
+#endif
for (i = 0; i < len; i++) {
if (!posns[i] || posns[i] == &df_conflict_list)
continue;
+#if DBRT_DEBUG
printf("%d %s\n", i + 1, posns[i]->name);
+#endif
if (!first || entcmp(first, firstdir,
posns[i]->name,
posns[i]->directory) > 0) {
@@ -183,6 +188,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
if (merge) {
int ret;
+#if DBRT_DEBUG
printf("%s:\n", first);
for (i = 0; i < src_size; i++) {
printf(" %d ", i);
@@ -191,11 +197,12 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
else
printf("\n");
}
-
+#endif
ret = fn(src);
+#if DBRT_DEBUG
printf("Added %d entries\n", ret);
-
+#endif
*indpos += ret;
} else {
for (i = 0; i < src_size; i++) {