]> git.proxmox.com Git - libgit2.git/blob - src/object.h
Merge branch 'development'
[libgit2.git] / src / object.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_object_h__
8 #define INCLUDE_object_h__
9
10 /** Base git object for inheritance */
11 struct git_object {
12 git_cached_obj cached;
13 git_repository *repo;
14 };
15
16 /* fully free the object; internal method, DO NOT EXPORT */
17 void git_object__free(void *object);
18
19 int git_object__from_odb_object(
20 git_object **object_out,
21 git_repository *repo,
22 git_odb_object *odb_obj,
23 git_otype type);
24
25 int git_object__resolve_to_type(git_object **obj, git_otype type);
26
27 int git_oid__parse(git_oid *oid, const char **buffer_out, const char *buffer_end, const char *header);
28
29 void git_oid__writebuf(git_buf *buf, const char *header, const git_oid *oid);
30
31 #endif