10 struct repository *repo;
16 const struct object_id *commit_oid;
17 const struct commit *commit;
19 struct pathspec pathspec;
20 unsigned int verbose : 1;
21 unsigned int worktree_attributes : 1;
22 unsigned int convert : 1;
23 int compression_level;
24 struct string_list extra_files;
29 int write_archive(int argc, const char **argv, const char *prefix,
30 struct repository *repo,
31 const char *name_hint, int remote);
33 const char *archive_format_from_filename(const char *filename);
35 /* archive backend stuff */
37 #define ARCHIVER_WANT_COMPRESSION_LEVELS 1
38 #define ARCHIVER_REMOTE 2
39 #define ARCHIVER_HIGH_COMPRESSION_LEVELS 4
42 int (*write_archive)(const struct archiver *, struct archiver_args *);
46 void register_archiver(struct archiver *);
48 void init_tar_archiver(void);
49 void init_zip_archiver(void);
50 void init_archivers(void);
52 typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
53 const struct object_id *oid,
54 const char *path, size_t pathlen,
56 void *buffer, unsigned long size);
58 int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
60 #endif /* ARCHIVE_H */