Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (38 sloc) 1.356 kb
4df096a Add git-archive
Franck Bui-Huu authored
1 #ifndef ARCHIVE_H
2 #define ARCHIVE_H
3
4 struct archiver_args {
5 const char *base;
d53fe81 archive: add baselen member to struct archiver_args
René Scharfe authored
6 size_t baselen;
4df096a Add git-archive
Franck Bui-Huu authored
7 struct tree *tree;
8 const unsigned char *commit_sha1;
8460b2f archive: specfile support (--pretty=format: in archive files)
René Scharfe authored
9 const struct commit *commit;
4df096a Add git-archive
Franck Bui-Huu authored
10 time_t time;
11 const char **pathspec;
e0ffb24 Add --verbose to git-archive
Junio C Hamano authored
12 unsigned int verbose : 1;
ba053ea Nguyễn Thái Ngọc Duy archive: do not read .gitattributes in working directory
pclouds authored
13 unsigned int worktree_attributes : 1;
9cb513b Nguyễn Thái Ngọc Duy archive: delegate blob reading to backend
pclouds authored
14 unsigned int convert : 1;
3a176c6 archive: make zip compression level independent from core git
René Scharfe authored
15 int compression_level;
4df096a Add git-archive
Franck Bui-Huu authored
16 };
17
13e0f88 Jeff King archive: refactor list of archive formats
peff authored
18 #define ARCHIVER_WANT_COMPRESSION_LEVELS 1
7b97730 Jeff King upload-archive: allow user to turn off filters
peff authored
19 #define ARCHIVER_REMOTE 2
13e0f88 Jeff King archive: refactor list of archive formats
peff authored
20 struct archiver {
21 const char *name;
4d7c989 Jeff King archive: pass archiver struct to write_archive callback
peff authored
22 int (*write_archive)(const struct archiver *, struct archiver_args *);
13e0f88 Jeff King archive: refactor list of archive formats
peff authored
23 unsigned flags;
4d7c989 Jeff King archive: pass archiver struct to write_archive callback
peff authored
24 void *data;
13e0f88 Jeff King archive: refactor list of archive formats
peff authored
25 };
26 extern void register_archiver(struct archiver *);
4df096a Add git-archive
Franck Bui-Huu authored
27
13e0f88 Jeff King archive: refactor list of archive formats
peff authored
28 extern void init_tar_archiver(void);
29 extern void init_zip_archiver(void);
562e25a archive: centralize archive entry writing
René Scharfe authored
30
9cb513b Nguyễn Thái Ngọc Duy archive: delegate blob reading to backend
pclouds authored
31 typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
32 const unsigned char *sha1,
33 const char *path, size_t pathlen,
34 unsigned int mode);
4df096a Add git-archive
Franck Bui-Huu authored
35
562e25a archive: centralize archive entry writing
René Scharfe authored
36 extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
7b97730 Jeff King upload-archive: allow user to turn off filters
peff authored
37 extern int write_archive(int argc, const char **argv, const char *prefix, int setup_prefix, const char *name_hint, int remote);
56baa61 Jeff King archive: move file extension format-guessing lower
peff authored
38
39 const char *archive_format_from_filename(const char *filename);
9cb513b Nguyễn Thái Ngọc Duy archive: delegate blob reading to backend
pclouds authored
40 extern void *sha1_file_to_archive(const struct archiver_args *args,
41 const char *path, const unsigned char *sha1,
42 unsigned int mode, enum object_type *type,
43 unsigned long *sizep);
562e25a archive: centralize archive entry writing
René Scharfe authored
44
4df096a Add git-archive
Franck Bui-Huu authored
45 #endif /* ARCHIVE_H */
Something went wrong with that request. Please try again.