submodule: add a helper to check if it is safe to write to .gitmodules
[gitweb.git] / builtin / ls-tree.c
index d44b4f9c27d31cfa331ccef7ae538d8a6e6c38c6..fe3b952cb3007d12c2e94a08b10486ed301c4769 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "cache.h"
 #include "config.h"
+#include "object-store.h"
 #include "blob.h"
 #include "tree.h"
 #include "commit.h"
@@ -94,7 +95,7 @@ static int show_tree(const struct object_id *oid, struct strbuf *base,
                        char size_text[24];
                        if (!strcmp(type, blob_type)) {
                                unsigned long size;
-                               if (oid_object_info(oid, &size) == OBJ_BAD)
+                               if (oid_object_info(the_repository, oid, &size) == OBJ_BAD)
                                        xsnprintf(size_text, sizeof(size_text),
                                                  "BAD");
                                else