diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-12-03 22:22:10 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-12-06 01:14:15 +0200 |
| commit | d12299fe22e549a20e632668fdbe13cab9def9df (patch) | |
| tree | 9d70b6bc154e776c49eaaddd9a66eb97aebab661 /src/odb_loose.c | |
| parent | 7d7cd8857a451ff50b126e452bcbdc0fb397db35 (diff) | |
| download | libgit2-d12299fe22e549a20e632668fdbe13cab9def9df.tar.gz | |
Change include structure for the project
The maze with include dependencies has been fixed.
There is now a global include:
#include <git.h>
The git_odb_backend API has been exposed.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/odb_loose.c')
| -rw-r--r-- | src/odb_loose.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c index 52430467b..a7d0d5c8a 100644 --- a/src/odb_loose.c +++ b/src/odb_loose.c @@ -25,11 +25,13 @@ #include "common.h" #include "git/zlib.h" +#include "git/object.h" #include "fileops.h" #include "hash.h" #include "odb.h" #include "delta-apply.h" +#include "git/odb_backend.h" typedef struct { /* object header data */ git_otype type; /* object type */ @@ -148,7 +150,7 @@ static size_t get_object_header(obj_hdr *hdr, unsigned char *data) typename[used] = 0; if (used == 0) return 0; - hdr->type = git_otype_fromstring(typename); + hdr->type = git_object_string2type(typename); used++; /* consume the space */ /* @@ -357,7 +359,7 @@ static int inflate_packlike_loose_disk_obj(git_rawobj *out, gitfo_buf *obj) if ((used = get_binary_object_header(&hdr, obj)) == 0) return GIT_ERROR; - if (!git_otype_is_loose(hdr.type)) + if (!git_object_typeisloose(hdr.type)) return GIT_ERROR; /* @@ -406,7 +408,7 @@ static int inflate_disk_obj(git_rawobj *out, gitfo_buf *obj) if ((used = get_object_header(&hdr, head)) == 0) return GIT_ERROR; - if (!git_otype_is_loose(hdr.type)) + if (!git_object_typeisloose(hdr.type)) return GIT_ERROR; /* @@ -489,7 +491,7 @@ static int read_header_loose(git_rawobj *out, const char *loc) if ((z_return != Z_STREAM_END && z_return != Z_BUF_ERROR) || get_object_header(&header_obj, inflated_buffer) == 0 - || git_otype_is_loose(header_obj.type) == 0) { + || git_object_typeisloose(header_obj.type) == 0) { error = GIT_EOBJCORRUPTED; goto cleanup; } |
