summaryrefslogtreecommitdiffstats
path: root/bundle.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:49:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:49:36 +0000
commit5ec6074f0633939fd17d94111d10c6c6b062978c (patch)
treebfaa17b5a64abc66c918e9c70969e519d9e1df8e /bundle.h
parentInitial commit. (diff)
downloadgit-upstream/1%2.30.2.tar.xz
git-upstream/1%2.30.2.zip
Adding upstream version 1:2.30.2.upstream/1%2.30.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bundle.h')
-rw-r--r--bundle.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/bundle.h b/bundle.h
new file mode 100644
index 0000000..f9e2d1c
--- /dev/null
+++ b/bundle.h
@@ -0,0 +1,34 @@
+#ifndef BUNDLE_H
+#define BUNDLE_H
+
+#include "strvec.h"
+#include "cache.h"
+
+struct ref_list {
+ unsigned int nr, alloc;
+ struct ref_list_entry {
+ struct object_id oid;
+ char *name;
+ } *list;
+};
+
+struct bundle_header {
+ unsigned version;
+ struct ref_list prerequisites;
+ struct ref_list references;
+ const struct git_hash_algo *hash_algo;
+};
+
+int is_bundle(const char *path, int quiet);
+int read_bundle_header(const char *path, struct bundle_header *header);
+int create_bundle(struct repository *r, const char *path,
+ int argc, const char **argv, struct strvec *pack_options,
+ int version);
+int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
+#define BUNDLE_VERBOSE 1
+int unbundle(struct repository *r, struct bundle_header *header,
+ int bundle_fd, int flags);
+int list_bundle_refs(struct bundle_header *header,
+ int argc, const char **argv);
+
+#endif