cache-tree: a bit more debugging support.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
May 3, 2006 at 16:10 UTC
00703e6d6822f81e7b22d079b7e6d9d044f46cf0
1 file changed
+6
-2
cache-tree.c
+6
-2
@@ -110,6 +110,10 @@ void cache_tree_invalidate_path(struct cache_tree *it, const char *path)
110
int namelen;
111
struct cache_tree_sub *down;
112
113
+#if DEBUG
114
+ fprintf(stderr, "cache-tree invalidate <%s>\n", path);
115
+#endif
116
+
117
if (!it)
118
return;
119
slash = strchr(path, '/');
@@ -335,7 +339,7 @@ static int update_one(struct cache_tree *it,
339
offset += 20;
340
341
#if DEBUG
338
- fprintf(stderr, "cache-tree %o %.*s\n",
342
+ fprintf(stderr, "cache-tree update-one %o %.*s\n",
343
mode, entlen, path + baselen);
344
#endif
345
}
@@ -351,7 +355,7 @@ static int update_one(struct cache_tree *it,
355
free(buffer);
356
it->entry_count = i;
357
#if DEBUG
354
- fprintf(stderr, "cache-tree (%d ent, %d subtree) %s\n",
358
+ fprintf(stderr, "cache-tree update-one (%d ent, %d subtree) %s\n",
359
it->entry_count, it->subtree_nr,
360
sha1_to_hex(it->sha1));
361
#endif