trace2: NULL is not allowed for va_list
[gitweb.git] / cache-tree.c
index 190c6e5aa6bbc79f5267fa96e3c14ed2438c0488..b13bfaf71e9e1554173beca4cfd8acf5929bc9ce 100644 (file)
@@ -225,7 +225,7 @@ int cache_tree_fully_valid(struct cache_tree *it)
        int i;
        if (!it)
                return 0;
-       if (it->entry_count < 0 || !has_sha1_file(it->oid.hash))
+       if (it->entry_count < 0 || !has_object_file(&it->oid))
                return 0;
        for (i = 0; i < it->subtree_nr; i++) {
                if (!cache_tree_fully_valid(it->down[i]->cache_tree))
@@ -253,7 +253,7 @@ static int update_one(struct cache_tree *it,
 
        *skip_count = 0;
 
-       if (0 <= it->entry_count && has_sha1_file(it->oid.hash))
+       if (0 <= it->entry_count && has_object_file(&it->oid))
                return it->entry_count;
 
        /*
@@ -448,7 +448,7 @@ int cache_tree_update(struct index_state *istate, int flags)
 }
 
 static void write_one(struct strbuf *buffer, struct cache_tree *it,
-                      const char *path, int pathlen)
+                     const char *path, int pathlen)
 {
        int i;
 
@@ -675,7 +675,7 @@ static void prime_cache_tree_rec(struct repository *r,
                        cnt++;
                else {
                        struct cache_tree_sub *sub;
-                       struct tree *subtree = lookup_tree(r, entry.oid);
+                       struct tree *subtree = lookup_tree(r, &entry.oid);
                        if (!subtree->object.parsed)
                                parse_tree(subtree);
                        sub = cache_tree_sub(it, entry.path);
@@ -724,7 +724,7 @@ int cache_tree_matches_traversal(struct cache_tree *root,
 
        it = find_cache_tree_from_traversal(root, info);
        it = cache_tree_find(it, ent->path);
-       if (it && it->entry_count > 0 && oideq(ent->oid, &it->oid))
+       if (it && it->entry_count > 0 && oideq(&ent->oid, &it->oid))
                return it->entry_count;
        return 0;
 }