]> git.proxmox.com Git - libgit2.git/blob - src/repository.h
Merge remote-tracking branch 'upstream/development' into config
[libgit2.git] / src / repository.h
1 #ifndef INCLUDE_repository_h__
2 #define INCLUDE_repository_h__
3
4 #include "git2/common.h"
5 #include "git2/oid.h"
6 #include "git2/odb.h"
7 #include "git2/repository.h"
8 #include "git2/object.h"
9
10 #include "hashtable.h"
11 #include "index.h"
12 #include "cache.h"
13 #include "refs.h"
14
15 #define DOT_GIT ".git"
16 #define GIT_DIR DOT_GIT "/"
17 #define GIT_OBJECTS_DIR "objects/"
18 #define GIT_INDEX_FILE "index"
19
20 struct git_object {
21 git_cached_obj cached;
22 git_repository *repo;
23 git_otype type;
24 };
25
26 struct git_repository {
27 git_odb *db;
28 git_index *index;
29
30 git_cache objects;
31 git_refcache references;
32
33 char *path_repository;
34 char *path_index;
35 char *path_odb;
36 char *path_workdir;
37
38 unsigned is_bare:1;
39 unsigned int lru_counter;
40 };
41
42 /* fully free the object; internal method, do not
43 * export */
44 void git_object__free(void *object);
45
46 int git__parse_oid(git_oid *oid, const char **buffer_out, const char *buffer_end, const char *header);
47 int git__write_oid(git_odb_stream *src, const char *header, const git_oid *oid);
48
49 #endif