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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
#ifndef CGIT_SHARED_H
#define CGIT_SHARED_H
#include "cgit.h"
extern char cgit_default_repo_desc[];
typedef void (*filepair_fn)(struct diff_filepair *pair);
typedef void (*linediff_fn)(char *line, int len);
extern struct cgit_repo *cgit_add_repo(const char *url);
extern struct cgit_repo *cgit_get_repoinfo(const char *url);
extern void cgit_diff_tree_cb(struct diff_queue_struct *q, struct diff_options *options, void *data);
extern int cgit_diff_files(const struct object_id *old_oid, const struct object_id *new_oid,
size_t *old_size, size_t *new_size, int *binary, int context, int ignorews,
linediff_fn fn);
extern void cgit_diff_limit_path(struct diff_options *opt, const char *prefix);
extern void cgit_diff_tree(const struct object_id *old_oid, const struct object_id *new_oid,
filepair_fn fn, const char *prefix, int ignorews);
extern void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix);
extern int cgit_blob_too_large(size_t size);
extern void cgit_literal_pathspec(struct pathspec *ps, struct pathspec_item *item, const char *path);
extern char *cgit_trim_end(const char *str, char c);
extern int cgit_read_first_line(const char *path, char **buf);
extern char *cgit_strdup_first_line(const char *text);
extern size_t cgit_utf8_seq_len(const unsigned char *p, size_t left);
extern void cgit_utf8_sanitize(char *text);
extern char *cgit_expand_macros(const char *text);
extern int cgit_readme_is_tracked(const char *readme);
extern int cgit_valid_rev(const char *rev);
extern int cgit_notes_ref_usable(const char *notes_ref);
#endif
|