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