blob: 9bbe0e7be1f25e96f92d3e0fdbc72e81f600935b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#ifndef GIT_H
#define GIT_H
#include <git2.h>
#include <stdint.h>
#include <time.h>
typedef struct git_repo git_repo;
typedef struct pull_request pull_request;
typedef struct file file;
typedef struct comment comment;
typedef struct git_branch git_branch;
struct git_repo {
git_repo *next;
git_repository *repo;
};
struct file {
char *name;
char *buf;
};
struct comment {
char *author;
char *desc;
int date;
};
struct git_branch {
char *name;
char *repo;
};
struct pull_request {
char *title;
char *desc;
char *author;
comment **comments;
time_t date;
uint8_t pr_type;
union {
file **patches;
git_branch *branch;
};
git_branch *merge_branch;
};
extern void cleanup_git(git_repository **repos);
extern git_repository **init_git(config *cfg);
#endif
|