backend_helpers.h 386 Bytes
Newer Older
1 2 3
#include "git2/sys/odb_backend.h"

typedef struct {
4 5 6
	const char *oid;
	const char *content;
} fake_object;
7

8 9
typedef struct {
	git_odb_backend parent;
10 11

	int exists_calls;
12
	int exists_prefix_calls;
13 14 15
	int read_calls;
	int read_header_calls;
	int read_prefix_calls;
16 17

	const fake_object *objects;
18 19 20 21
} fake_backend;

int build_fake_backend(
	git_odb_backend **out,
22
	const fake_object *objects);