pack-redundant: consistent sort method
[gitweb.git] / builtin / ls-tree.c
index 409da4e8351f6d8719671d3176f0ea34fe9b756c..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"
@@ -99,7 +100,7 @@ static int show_tree(const struct object_id *oid, struct strbuf *base,
                                                  "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,