Skip to content

Commit

Permalink
test-dump-cache-tree: report number of subtrees.
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Apr 26, 2006
1 parent 61fa309 commit 0f88205
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dump-cache-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ static void dump_cache_tree(struct cache_tree *it, const char *pfx)
if (!it)
return;
if (it->entry_count < 0)
printf("%-40s %s\n", "invalid", pfx);
printf("%-40s %s (%d subtrees)\n", "invalid", pfx,
it->subtree_nr);
else
printf("%s %s (%d entries)\n",
printf("%s %s (%d entries, %d subtrees)\n",
sha1_to_hex(it->sha1),
pfx, it->entry_count);
pfx, it->entry_count, it->subtree_nr);
for (i = 0; i < it->subtree_nr; i++) {
char path[PATH_MAX];
struct cache_tree_sub *down = it->down[i];
Expand Down

0 comments on commit 0f88205

Please sign in to comment.