10 struct repository
*repo
;
15 const struct object_id
*commit_oid
;
16 const struct commit
*commit
;
18 struct pathspec pathspec
;
19 unsigned int verbose
: 1;
20 unsigned int worktree_attributes
: 1;
21 unsigned int convert
: 1;
22 int compression_level
;
27 int write_archive(int argc
, const char **argv
, const char *prefix
,
28 struct repository
*repo
,
29 const char *name_hint
, int remote
);
31 const char *archive_format_from_filename(const char *filename
);
33 /* archive backend stuff */
35 #define ARCHIVER_WANT_COMPRESSION_LEVELS 1
36 #define ARCHIVER_REMOTE 2
39 int (*write_archive
)(const struct archiver
*, struct archiver_args
*);
43 void register_archiver(struct archiver
*);
45 void init_tar_archiver(void);
46 void init_zip_archiver(void);
47 void init_archivers(void);
49 typedef int (*write_archive_entry_fn_t
)(struct archiver_args
*args
,
50 const struct object_id
*oid
,
51 const char *path
, size_t pathlen
,
54 int write_archive_entries(struct archiver_args
*args
, write_archive_entry_fn_t write_entry
);
55 void *object_file_to_archive(const struct archiver_args
*args
,
56 const char *path
, const struct object_id
*oid
,
57 unsigned int mode
, enum object_type
*type
,
58 unsigned long *sizep
);
60 #endif /* ARCHIVE_H */