stash: convert branch to builtin
[gitweb.git] / builtin / ls-tree.c
index d44b4f9c27d31cfa331ccef7ae538d8a6e6c38c6..7d581d6463dc534606d27b1998c27991a800d6f1 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,12 +95,12 @@ 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
                                        xsnprintf(size_text, sizeof(size_text),
-                                                 "%lu", size);
+                                                 "%"PRIuMAX, (uintmax_t)size);
                        } else
                                xsnprintf(size_text, sizeof(size_text), "-");
                        printf("%06o %s %s %7s\t", mode, type,