Add testcase to ensure merging an early part of a branch is done properly
[git/spearce.git] / archive.h
blob0b15b35143fffcc13764e4e668ee452b191cc609
1 #ifndef ARCHIVE_H
2 #define ARCHIVE_H
4 struct archiver_args {
5 const char *base;
6 size_t baselen;
7 struct tree *tree;
8 const unsigned char *commit_sha1;
9 const struct commit *commit;
10 time_t time;
11 const char **pathspec;
12 unsigned int verbose : 1;
13 int compression_level;
16 typedef int (*write_archive_fn_t)(struct archiver_args *);
18 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);
21 * Archive-format specific backends.
23 extern int write_tar_archive(struct archiver_args *);
24 extern int write_zip_archive(struct archiver_args *);
26 extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
27 extern int write_archive(int argc, const char **argv, const char *prefix, int setup_prefix);
29 #endif /* ARCHIVE_H */