summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-04-26 00:40:24 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-04-26 00:40:24 (GMT)
commit0f8820528e4c2e4b3e1306cfe79998e7124c8d49 (patch)
tree296ac4cec3e7e1cd5a6cb8dc4a5be13ffdb78b30
parent61fa30972c45e73d39c81d27af9eeacbda7531c9 (diff)
downloadgit-0f8820528e4c2e4b3e1306cfe79998e7124c8d49.zip
git-0f8820528e4c2e4b3e1306cfe79998e7124c8d49.tar.gz
git-0f8820528e4c2e4b3e1306cfe79998e7124c8d49.tar.bz2
test-dump-cache-tree: report number of subtrees.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--dump-cache-tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/dump-cache-tree.c b/dump-cache-tree.c
index 01e8bff..f6a19ba 100644
--- a/dump-cache-tree.c
+++ b/dump-cache-tree.c
@@ -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];