Merge branch 'rs/obsd-getcwd-workaround' into next
[gitweb.git] / builtin / count-objects.c
index a04b4f2ef337d4d9d8cb24de7288630ee8ab823c..1d82e61f2a6391bd93a6c3dd91a2515189ff79cc 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "cache.h"
+#include "config.h"
 #include "dir.h"
 #include "builtin.h"
 #include "parse-options.h"
@@ -53,7 +54,7 @@ static void loose_garbage(const char *path)
                report_garbage(PACKDIR_FILE_GARBAGE, path);
 }
 
-static int count_loose(const unsigned char *sha1, const char *path, void *data)
+static int count_loose(const struct object_id *oid, const char *path, void *data)
 {
        struct stat st;
 
@@ -62,7 +63,7 @@ static int count_loose(const unsigned char *sha1, const char *path, void *data)
        else {
                loose_size += on_disk_bytes(st);
                loose++;
-               if (verbose && has_sha1_pack(sha1))
+               if (verbose && has_sha1_pack(oid->hash))
                        packed_loose++;
        }
        return 0;