diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-29 22:00:21 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-29 22:00:21 -0700 |
commit | e76abd701419b50937708cfec2f772d33057505e (patch) | |
tree | 4aafe90abedd6cb7a370997b5a17f80c2805414c | |
parent | 0a2586c807fadc4b13a741e693471765870f6bb4 (diff) | |
download | git-e76abd701419b50937708cfec2f772d33057505e.tar.gz |
adjust to the rebased series by Linus.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | builtin-read-tree.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c index b93178a4ba..480e6ed372 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -9,8 +9,8 @@ #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" @@ -777,12 +777,12 @@ static int read_cache_unmerged(void) 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; @@ -790,14 +790,11 @@ static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree) 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); |