Hash :
a7a7ddbe
Author :
Date :
2010-09-18T19:16:04
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#ifndef INCLUDE_repository_h__
#define INCLUDE_repository_h__
#include "git/common.h"
#include "git/oid.h"
#include "git/odb.h"
#include "git/repository.h"
#include "hashtable.h"
struct git_repository_object {
git_oid id;
git_repository *repo;
git_obj dbo;
struct {
void *write_ptr;
size_t ptr_size;
size_t written_bytes;
} writeback;
int dbo_open:1, out_of_sync:1;
};
struct git_repository {
git_odb *db;
git_hashtable *objects;
};
int git_repository__dbo_open(git_repository_object *object);
void git_repository__dbo_close(git_repository_object *object);
void git_repository__dbo_prepare_write(git_repository_object *object);
int git_repository__dbo_write(git_repository_object *object, const void *bytes, size_t len);
int git_repository__dbo_writeback(git_repository_object *object);
#endif