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/oid.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/oid.c')
-rw-r--r-- | src/oid.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -151,3 +151,18 @@ int git__write_oid(git_odb_source *src, const char *header, const git_oid *oid) return git__source_printf(src, "%s %s\n", header, hex_oid); } + +void git_oid_mkraw(git_oid *out, const unsigned char *raw) +{ + memcpy(out->id, raw, sizeof(out->id)); +} + +void git_oid_cpy(git_oid *out, const git_oid *src) +{ + memcpy(out->id, src->id, sizeof(out->id)); +} + +int git_oid_cmp(const git_oid *a, const git_oid *b) +{ + return memcmp(a->id, b->id, sizeof(a->id)); +} |