index.h 574 Bytes
Newer Older
1 2 3 4
#ifndef INCLUDE_index_h__
#define INCLUDE_index_h__

#include "fileops.h"
5
#include "filebuf.h"
6
#include "vector.h"
7 8
#include "git2/odb.h"
#include "git2/index.h"
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

struct git_index_tree {
	char *name;

	struct git_index_tree *parent;
	struct git_index_tree **children;
	size_t children_count;

	size_t entries;
	git_oid oid;
};

typedef struct git_index_tree git_index_tree;

struct git_index {
24
	git_repository *repository;
25
	char *index_file_path;
26

27
	time_t last_modified;
28
	git_vector entries;
29

30
	unsigned int on_disk:1;
31
	git_index_tree *tree;
32 33

	git_vector unmerged;
34 35 36
};

#endif