]> git.ipfire.org Git - thirdparty/git.git/blame - bundle.h
list-objects: handle NULL function pointers
[thirdparty/git.git] / bundle.h
CommitLineData
30415d50
JS
1#ifndef BUNDLE_H
2#define BUNDLE_H
3
dbbcd44f 4#include "strvec.h"
b8607f35 5#include "cache.h"
10b635b7 6#include "string-list.h"
30415d50
JS
7
8struct bundle_header {
c5aecfc8 9 unsigned version;
10b635b7
ÆAB
10 struct string_list prerequisites;
11 struct string_list references;
6161ce7b 12 const struct git_hash_algo *hash_algo;
30415d50
JS
13};
14
10b635b7
ÆAB
15#define BUNDLE_HEADER_INIT \
16{ \
17 .prerequisites = STRING_LIST_INIT_DUP, \
18 .references = STRING_LIST_INIT_DUP, \
19}
20void bundle_header_init(struct bundle_header *header);
21void bundle_header_release(struct bundle_header *header);
22
2727b71f 23int is_bundle(const char *path, int quiet);
30415d50 24int read_bundle_header(const char *path, struct bundle_header *header);
fcb133e9 25int create_bundle(struct repository *r, const char *path,
e0ad9574 26 int argc, const char **argv, struct strvec *pack_options,
c5aecfc8 27 int version);
74ae4b63 28int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
08342573
ÆAB
29
30/**
31 * Unbundle after reading the header with read_bundle_header().
32 *
33 * We'll invoke "git index-pack --stdin --fix-thin" for you on the
34 * provided `bundle_fd` from read_bundle_header().
7366096d
ÆAB
35 *
36 * Provide "extra_index_pack_args" to pass any extra arguments
37 * (e.g. "-v" for verbose/progress), NULL otherwise. The provided
38 * "extra_index_pack_args" (if any) will be strvec_clear()'d for you.
08342573 39 */
74ae4b63 40int unbundle(struct repository *r, struct bundle_header *header,
7366096d 41 int bundle_fd, struct strvec *extra_index_pack_args);
30415d50
JS
42int list_bundle_refs(struct bundle_header *header,
43 int argc, const char **argv);
44
45#endif