name-rev: refactor logic to see if a new candidate is a better name
[gitweb.git] / builtin / prune-packed.c
index f24a2c2bdca81fd2cb6d7b4968e46ad6922a9c9f..c026299e789abe19826264225fa2000b3149f875 100644 (file)
@@ -4,7 +4,7 @@
 #include "parse-options.h"
 
 static const char * const prune_packed_usage[] = {
-       N_("git prune-packed [-n|--dry-run] [-q|--quiet]"),
+       N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),
        NULL
 };
 
@@ -19,12 +19,12 @@ static int prune_subdir(int nr, const char *path, void *data)
        return 0;
 }
 
-static int prune_object(const unsigned char *sha1, const char *path,
+static int prune_object(const struct object_id *oid, const char *path,
                         void *data)
 {
        int *opts = data;
 
-       if (!has_sha1_pack(sha1))
+       if (!has_sha1_pack(oid->hash))
                return 0;
 
        if (*opts & PRUNE_PACKED_DRY_RUN)