8 struct pretty_print_context
;
10 struct archiver_args
{
11 struct repository
*repo
;
17 const struct object_id
*commit_oid
;
18 const struct commit
*commit
;
19 const char *mtime_option
;
21 struct pathspec pathspec
;
22 unsigned int verbose
: 1;
23 unsigned int worktree_attributes
: 1;
24 unsigned int convert
: 1;
25 int compression_level
;
26 struct string_list extra_files
;
27 struct pretty_print_context
*pretty_ctx
;
32 int write_archive(int argc
, const char **argv
, const char *prefix
,
33 struct repository
*repo
,
34 const char *name_hint
, int remote
);
36 const char *archive_format_from_filename(const char *filename
);
38 /* archive backend stuff */
40 #define ARCHIVER_WANT_COMPRESSION_LEVELS 1
41 #define ARCHIVER_REMOTE 2
42 #define ARCHIVER_HIGH_COMPRESSION_LEVELS 4
45 int (*write_archive
)(const struct archiver
*, struct archiver_args
*);
49 void register_archiver(struct archiver
*);
51 void init_tar_archiver(void);
52 void init_zip_archiver(void);
53 void init_archivers(void);
55 typedef int (*write_archive_entry_fn_t
)(struct archiver_args
*args
,
56 const struct object_id
*oid
,
57 const char *path
, size_t pathlen
,
59 void *buffer
, unsigned long size
);
61 int write_archive_entries(struct archiver_args
*args
, write_archive_entry_fn_t write_entry
);
63 #endif /* ARCHIVE_H */