for_each_*_object: take flag arguments as enum
[gitweb.git] / walker.c
index 86359ab0ab62990cf7097b0d59940f1f0b04fec5..96990d84dabfdd34e169c8e9fcfd656633e4f31e 100644 (file)
--- a/walker.c
+++ b/walker.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "walker.h"
+#include "repository.h"
 #include "object-store.h"
 #include "commit.h"
 #include "tree.h"
@@ -48,12 +49,14 @@ static int process_tree(struct walker *walker, struct tree *tree)
                if (S_ISGITLINK(entry.mode))
                        continue;
                if (S_ISDIR(entry.mode)) {
-                       struct tree *tree = lookup_tree(entry.oid);
+                       struct tree *tree = lookup_tree(the_repository,
+                                                       entry.oid);
                        if (tree)
                                obj = &tree->object;
                }
                else {
-                       struct blob *blob = lookup_blob(entry.oid);
+                       struct blob *blob = lookup_blob(the_repository,
+                                                       entry.oid);
                        if (blob)
                                obj = &blob->object;
                }
@@ -178,7 +181,7 @@ static int loop(struct walker *walker)
                        }
                }
                if (!obj->type)
-                       parse_object(&obj->oid);
+                       parse_object(the_repository, &obj->oid);
                if (process_object(walker, obj))
                        return -1;
        }
@@ -204,7 +207,8 @@ static int interpret_target(struct walker *walker, char *target, struct object_i
 static int mark_complete(const char *path, const struct object_id *oid,
                         int flag, void *cb_data)
 {
-       struct commit *commit = lookup_commit_reference_gently(oid, 1);
+       struct commit *commit = lookup_commit_reference_gently(the_repository,
+                                                              oid, 1);
 
        if (commit) {
                commit->object.flags |= COMPLETE;