commit.h 738 Bytes
Newer Older
Vicent Marti committed
1 2 3 4 5 6
/*
 * Copyright (C) 2009-2011 the libgit2 contributors
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
7 8
#ifndef INCLUDE_commit_h__
#define INCLUDE_commit_h__
9

10
#include "git2/commit.h"
11
#include "tree.h"
12
#include "repository.h"
13
#include "vector.h"
14 15 16 17

#include <time.h>

struct git_commit {
18
	git_object object;
19

20 21
	git_vector parent_oids;
	git_oid tree_oid;
22

23 24
	git_signature *author;
	git_signature *committer;
25

26
	char *message_encoding;
27
	char *message;
28 29
};

30
void git_commit__free(git_commit *c);
Vicent Marti committed
31
int git_commit__parse(git_commit *commit, git_odb_object *obj);
32

33
int git_commit__parse_buffer(git_commit *commit, const void *data, size_t len);
34
#endif