test-dump-cache-tree: report number of subtrees.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Apr 25, 2006 at 17:40 UTC
0f8820528e4c2e4b3e1306cfe79998e7124c8d49
1 file changed
+4
-3
dump-cache-tree.c
+4
-3
@@ -8,11 +8,12 @@ static void dump_cache_tree(struct cache_tree *it, const char *pfx)
8
if (!it)
9
return;
10
if (it->entry_count < 0)
11
- printf("%-40s %s\n", "invalid", pfx);
11
+ printf("%-40s %s (%d subtrees)\n", "invalid", pfx,
12
+ it->subtree_nr);
13
else
13
- printf("%s %s (%d entries)\n",
14
+ printf("%s %s (%d entries, %d subtrees)\n",
15
sha1_to_hex(it->sha1),
15
- pfx, it->entry_count);
16
+ pfx, it->entry_count, it->subtree_nr);
17
for (i = 0; i < it->subtree_nr; i++) {
18
char path[PATH_MAX];
19
struct cache_tree_sub *down = it->down[i];