add: don't write objects with --dry-run
[git/debian.git] / bundle.h
blob1927d8cd6a4a4764a0a84e4ed35a6c9eb7b15fd6
1 #ifndef BUNDLE_H
2 #define BUNDLE_H
4 #include "strvec.h"
5 #include "cache.h"
6 #include "string-list.h"
8 struct bundle_header {
9 unsigned version;
10 struct string_list prerequisites;
11 struct string_list references;
12 const struct git_hash_algo *hash_algo;
15 #define BUNDLE_HEADER_INIT \
16 { \
17 .prerequisites = STRING_LIST_INIT_DUP, \
18 .references = STRING_LIST_INIT_DUP, \
20 void bundle_header_init(struct bundle_header *header);
21 void bundle_header_release(struct bundle_header *header);
23 int is_bundle(const char *path, int quiet);
24 int read_bundle_header(const char *path, struct bundle_header *header);
25 int create_bundle(struct repository *r, const char *path,
26 int argc, const char **argv, struct strvec *pack_options,
27 int version);
28 int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
29 #define BUNDLE_VERBOSE 1
30 int unbundle(struct repository *r, struct bundle_header *header,
31 int bundle_fd, int flags);
32 int list_bundle_refs(struct bundle_header *header,
33 int argc, const char **argv);
35 #endif