summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archive-tar.c3
-rw-r--r--archive-zip.c3
-rw-r--r--archive.c2
-rw-r--r--archive.h3
4 files changed, 7 insertions, 4 deletions
diff --git a/archive-tar.c b/archive-tar.c
index 930375bf21..bed9a9b15c 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -234,7 +234,8 @@ static int git_tar_config(const char *var, const char *value, void *cb)
return 0;
}
-static int write_tar_archive(struct archiver_args *args)
+static int write_tar_archive(const struct archiver *ar,
+ struct archiver_args *args)
{
int err = 0;
diff --git a/archive-zip.c b/archive-zip.c
index a776d8359c..42df66080a 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -261,7 +261,8 @@ static void dos_time(time_t *time, int *dos_date, int *dos_time)
*dos_time = t->tm_sec / 2 + t->tm_min * 32 + t->tm_hour * 2048;
}
-static int write_zip_archive(struct archiver_args *args)
+static int write_zip_archive(const struct archiver *ar,
+ struct archiver_args *args)
{
int err;
diff --git a/archive.c b/archive.c
index f0b4e85513..a0a5beb948 100644
--- a/archive.c
+++ b/archive.c
@@ -410,5 +410,5 @@ int write_archive(int argc, const char **argv, const char *prefix,
parse_treeish_arg(argv, &args, prefix);
parse_pathspec_arg(argv + 1, &args);
- return ar->write_archive(&args);
+ return ar->write_archive(ar, &args);
}
diff --git a/archive.h b/archive.h
index f39cede0c6..b3cf2198b1 100644
--- a/archive.h
+++ b/archive.h
@@ -17,8 +17,9 @@ struct archiver_args {
#define ARCHIVER_WANT_COMPRESSION_LEVELS 1
struct archiver {
const char *name;
- int (*write_archive)(struct archiver_args *);
+ int (*write_archive)(const struct archiver *, struct archiver_args *);
unsigned flags;
+ void *data;
};
extern void register_archiver(struct archiver *);