10 struct repository
*repo
;
14 const unsigned char *commit_sha1
;
15 const struct commit
*commit
;
17 struct pathspec pathspec
;
18 unsigned int verbose
: 1;
19 unsigned int worktree_attributes
: 1;
20 unsigned int convert
: 1;
21 int compression_level
;
26 extern int write_archive(int argc
, const char **argv
, const char *prefix
,
27 struct repository
*repo
,
28 const char *name_hint
, int remote
);
30 const char *archive_format_from_filename(const char *filename
);
32 /* archive backend stuff */
34 #define ARCHIVER_WANT_COMPRESSION_LEVELS 1
35 #define ARCHIVER_REMOTE 2
38 int (*write_archive
)(const struct archiver
*, struct archiver_args
*);
42 extern void register_archiver(struct archiver
*);
44 extern void init_tar_archiver(void);
45 extern void init_zip_archiver(void);
46 extern void init_archivers(void);
48 typedef int (*write_archive_entry_fn_t
)(struct archiver_args
*args
,
49 const struct object_id
*oid
,
50 const char *path
, size_t pathlen
,
53 extern int write_archive_entries(struct archiver_args
*args
, write_archive_entry_fn_t write_entry
);
54 extern void *object_file_to_archive(const struct archiver_args
*args
,
55 const char *path
, const struct object_id
*oid
,
56 unsigned int mode
, enum object_type
*type
,
57 unsigned long *sizep
);
59 #endif /* ARCHIVE_H */