File: backend_helpers.h

package info (click to toggle)
libgit2 1.1.0%2Bdfsg.1-4%2Bdeb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 53,324 kB
  • sloc: ansic: 173,567; sh: 562; python: 351; php: 65; makefile: 50
file content (22 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "git2/sys/odb_backend.h"

typedef struct {
	const char *oid;
	const char *content;
} fake_object;

typedef struct {
	git_odb_backend parent;

	int exists_calls;
	int exists_prefix_calls;
	int read_calls;
	int read_header_calls;
	int read_prefix_calls;

	const fake_object *objects;
} fake_backend;

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