summaryrefslogtreecommitdiff
path: root/builtin/prune-packed.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/prune-packed.c')
-rw-r--r--builtin/prune-packed.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index 7cf900ea07..419238171d 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -2,6 +2,7 @@
#include "cache.h"
#include "progress.h"
#include "parse-options.h"
+#include "packfile.h"
static const char * const prune_packed_usage[] = {
N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),
@@ -10,7 +11,7 @@ static const char * const prune_packed_usage[] = {
static struct progress *progress;
-static int prune_subdir(int nr, const char *path, void *data)
+static int prune_subdir(unsigned int nr, const char *path, void *data)
{
int *opts = data;
display_progress(progress, nr + 1);
@@ -19,12 +20,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)
@@ -37,8 +38,7 @@ static int prune_object(const unsigned char *sha1, const char *path,
void prune_packed_objects(int opts)
{
if (opts & PRUNE_PACKED_VERBOSE)
- progress = start_progress_delay(_("Removing duplicate objects"),
- 256, 95, 2);
+ progress = start_delayed_progress(_("Removing duplicate objects"), 256);
for_each_loose_file_in_objdir(get_object_directory(),
prune_object, NULL, prune_subdir, &opts);