4 #define MAX_EXTRA_ARGS 32
5 #define MAX_ARGS (MAX_EXTRA_ARGS + 32)
11 const unsigned char *commit_sha1
;
12 const struct commit
*commit
;
14 const char **pathspec
;
15 unsigned int verbose
: 1;
16 int compression_level
;
19 typedef int (*write_archive_fn_t
)(struct archiver_args
*);
21 typedef int (*write_archive_entry_fn_t
)(struct archiver_args
*args
, const unsigned char *sha1
, const char *path
, size_t pathlen
, unsigned int mode
, void *buffer
, unsigned long size
);
25 write_archive_fn_t write_archive
;
29 extern int parse_archive_args(int argc
, const char **argv
, const struct archiver
**ar
, struct archiver_args
*args
);
31 extern void parse_treeish_arg(const char **treeish
,
32 struct archiver_args
*ar_args
,
35 extern void parse_pathspec_arg(const char **pathspec
,
36 struct archiver_args
*args
);
38 * Archive-format specific backends.
40 extern int write_tar_archive(struct archiver_args
*);
41 extern int write_zip_archive(struct archiver_args
*);
43 extern int write_archive_entries(struct archiver_args
*args
, write_archive_entry_fn_t write_entry
);
45 #endif /* ARCHIVE_H */