]> git.proxmox.com Git - libgit2.git/blame - src/commit.h
Redesigned the walking/object lookup interface
[libgit2.git] / src / commit.h
CommitLineData
4f0adcd0
AE
1#ifndef INCLUDE_commit_h__
2#define INCLUDE_commit_h__
b3039bee 3
4f0adcd0 4#include "git/commit.h"
225fe215 5#include "tree.h"
3315782c 6#include "repository.h"
4f0adcd0
AE
7
8#include <time.h>
9
52f2390b
VM
10#define GIT_COMMIT_TREE (1 << 1)
11#define GIT_COMMIT_PARENTS (1 << 2)
12#define GIT_COMMIT_AUTHOR (1 << 3)
13#define GIT_COMMIT_COMMITTER (1 << 4)
14#define GIT_COMMIT_TIME (1 << 5)
15#define GIT_COMMIT_MESSAGE (1 << 6)
16#define GIT_COMMIT_MESSAGE_SHORT (1 << 7)
17#define GIT_COMMIT_FOOTERS (1 << 8)
225fe215 18
3315782c
VM
19typedef struct git_commit_parents {
20 git_commit *commit;
21 struct git_commit_parents *next;
22} git_commit_parents;
23
4f0adcd0 24struct git_commit {
3315782c 25 git_repository_object object;
52f2390b 26 git_obj odb_object;
c5696427 27
9b3577ed 28 time_t commit_time;
3315782c 29 git_commit_parents *parents;
08d5d000 30
225fe215 31 git_tree *tree;
364788e1
VM
32 git_person *author;
33 git_person *committer;
52f2390b
VM
34
35 char *message;
36 char *message_short;
225fe215 37
52f2390b 38 unsigned basic_parse:1,
3315782c 39 odb_open:1;
4f0adcd0
AE
40};
41
40721f6b 42void git_commit__free(git_commit *c);
52f2390b
VM
43int git_commit__parse(git_commit *commit, unsigned int flags, int close_odb);
44int git_commit__parse_basic(git_commit *commit);
52f2390b 45int git_commit__parse_buffer(git_commit *commit, void *data, size_t len, unsigned int parse_flags);
1a895dd7 46void git_commit__mark_uninteresting(git_commit *commit);
417f0abc 47
364788e1
VM
48int git__parse_oid(git_oid *oid, char **buffer_out, const char *buffer_end, const char *header);
49int git__parse_person(git_person *person, char **buffer_out, const char *buffer_end, const char *header);
655d381a 50
08d5d000 51
4f0adcd0 52#endif