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