summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a2586c)
raw | patch | inline | side by side (parent: 0a2586c)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 30 May 2006 05:00:21 +0000 (22:00 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 30 May 2006 05:00:21 +0000 (22:00 -0700) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-read-tree.c | patch | blob | history |
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index b93178a4ba02d234e907d10d39e9d56051171dbc..480e6ed3723cfc00325245416b4b1d9089788144 100644 (file)
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
#include "object.h"
#include "tree.h"
-#include "cache-tree.h"
#include "tree-walk.h"
+#include "cache-tree.h"
#include <sys/time.h>
#include <signal.h>
#include "builtin.h"
static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
{
struct tree_desc desc;
- int cnt = 0;
+ int cnt;
memcpy(it->sha1, tree->object.sha1, 20);
desc.buf = tree->buffer;
desc.size = tree->size;
-
+ cnt = 0;
while (desc.size) {
unsigned mode;
const char *name;
sha1 = tree_entry_extract(&desc, &name, &mode);
update_tree_entry(&desc);
-
if (!S_ISDIR(mode))
cnt++;
else {
struct cache_tree_sub *sub;
- struct tree *subtree;
-
- subtree = lookup_tree(sha1);
+ struct tree *subtree = lookup_tree(sha1);
if (!subtree->object.parsed)
parse_tree(subtree);
sub = cache_tree_sub(it, name);