]> git.proxmox.com Git - libgit2.git/blame - src/repository.h
Added rmdir_recurs(), a test helper function which recursively removes the content...
[libgit2.git] / src / repository.h
CommitLineData
3315782c
VM
1#ifndef INCLUDE_repository_h__
2#define INCLUDE_repository_h__
3
44908fe7
VM
4#include "git2/common.h"
5#include "git2/oid.h"
6#include "git2/odb.h"
7#include "git2/repository.h"
3315782c
VM
8
9#include "hashtable.h"
6fd195d7 10#include "index.h"
9282e921 11#include "refs.h"
3315782c 12
f49a2e49
VM
13typedef struct {
14 git_rawobj raw;
15 void *write_ptr;
16 size_t written_bytes;
d45b4a9a 17 int open:1;
f49a2e49
VM
18} git_odb_source;
19
20struct git_object {
3315782c
VM
21 git_oid id;
22 git_repository *repo;
f49a2e49 23 git_odb_source source;
0c3596f1 24 int in_memory:1, modified:1;
3315782c
VM
25};
26
27struct git_repository {
28 git_odb *db;
6fd195d7 29 git_index *index;
3315782c 30 git_hashtable *objects;
2f8a8ab2
VM
31
32 git_refcache references;
6fd195d7
VM
33
34 char *path_repository;
35 char *path_index;
36 char *path_odb;
37 char *path_workdir;
38
39 unsigned is_bare:1;
3315782c
VM
40};
41
f49a2e49
VM
42int git_object__source_open(git_object *object);
43void git_object__source_close(git_object *object);
3315782c 44
e802d8cc
VM
45int git__source_printf(git_odb_source *source, const char *format, ...);
46int git__source_write(git_odb_source *source, const void *bytes, size_t len);
47
58519018
VM
48int git__parse_oid(git_oid *oid, char **buffer_out, const char *buffer_end, const char *header);
49int git__write_oid(git_odb_source *src, const char *header, const git_oid *oid);
50
3315782c 51#endif