bundle.h 769 Bytes
Newer Older
1 2 3
#ifndef BUNDLE_H
#define BUNDLE_H

4 5
#include "cache.h"

6 7 8
struct ref_list {
	unsigned int nr, alloc;
	struct ref_list_entry {
9
		struct object_id oid;
10 11 12 13 14 15 16 17 18
		char *name;
	} *list;
};

struct bundle_header {
	struct ref_list prerequisites;
	struct ref_list references;
};

19
int is_bundle(const char *path, int quiet);
20
int read_bundle_header(const char *path, struct bundle_header *header);
21 22
int create_bundle(struct repository *r, const char *path,
		  int argc, const char **argv);
23
int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
24
#define BUNDLE_VERBOSE 1
25 26
int unbundle(struct repository *r, struct bundle_header *header,
	     int bundle_fd, int flags);
27 28 29 30
int list_bundle_refs(struct bundle_header *header,
		int argc, const char **argv);

#endif