summaryrefslogtreecommitdiff
path: root/bundle.h
diff options
context:
space:
mode:
Diffstat (limited to 'bundle.h')
-rw-r--r--bundle.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/bundle.h b/bundle.h
index 37c37d7f65..1927d8cd6a 100644
--- a/bundle.h
+++ b/bundle.h
@@ -1,25 +1,30 @@
#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;
-};
+#include "string-list.h"
struct bundle_header {
- struct ref_list prerequisites;
- struct ref_list references;
+ unsigned version;
+ struct string_list prerequisites;
+ struct string_list references;
+ const struct git_hash_algo *hash_algo;
};
+#define BUNDLE_HEADER_INIT \
+{ \
+ .prerequisites = STRING_LIST_INIT_DUP, \
+ .references = STRING_LIST_INIT_DUP, \
+}
+void bundle_header_init(struct bundle_header *header);
+void bundle_header_release(struct bundle_header *header);
+
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);
+ 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,