Johannes Schindelin | 30415d5 | 2007-09-10 23:03:15 -0400 | [diff] [blame] | 1 | #ifndef BUNDLE_H |
| 2 | #define BUNDLE_H |
| 3 | |
| 4 | struct ref_list { |
| 5 | unsigned int nr, alloc; |
| 6 | struct ref_list_entry { |
| 7 | unsigned char sha1[20]; |
| 8 | char *name; |
| 9 | } *list; |
| 10 | }; |
| 11 | |
| 12 | struct bundle_header { |
| 13 | struct ref_list prerequisites; |
| 14 | struct ref_list references; |
| 15 | }; |
| 16 | |
Junio C Hamano | 2727b71 | 2011-10-13 15:19:31 -0700 | [diff] [blame] | 17 | int is_bundle(const char *path, int quiet); |
Johannes Schindelin | 30415d5 | 2007-09-10 23:03:15 -0400 | [diff] [blame] | 18 | int read_bundle_header(const char *path, struct bundle_header *header); |
| 19 | int create_bundle(struct bundle_header *header, const char *path, |
| 20 | int argc, const char **argv); |
| 21 | int verify_bundle(struct bundle_header *header, int verbose); |
Junio C Hamano | be042af | 2011-09-18 16:52:32 -0700 | [diff] [blame] | 22 | #define BUNDLE_VERBOSE 1 |
| 23 | int unbundle(struct bundle_header *header, int bundle_fd, int flags); |
Johannes Schindelin | 30415d5 | 2007-09-10 23:03:15 -0400 | [diff] [blame] | 24 | int list_bundle_refs(struct bundle_header *header, |
| 25 | int argc, const char **argv); |
| 26 | |
| 27 | #endif |