]>
Commit | Line | Data |
---|---|---|
22a2d3d5 | 1 | #include "futils.h" |
3a437590 | 2 | #include "git2/diff.h" |
b6c93aef RB |
3 | |
4 | extern git_tree *resolve_commit_oid_to_tree( | |
5 | git_repository *repo, const char *partial_oid); | |
3a437590 RB |
6 | |
7 | typedef struct { | |
8 | int files; | |
71966e2f RB |
9 | int files_binary; |
10 | ||
bb815157 | 11 | int file_status[11]; /* indexed by git_delta_t value */ |
3a437590 RB |
12 | |
13 | int hunks; | |
14 | int hunk_new_lines; | |
15 | int hunk_old_lines; | |
16 | ||
17 | int lines; | |
18 | int line_ctxt; | |
19 | int line_adds; | |
20 | int line_dels; | |
a66c4bc8 RB |
21 | |
22 | /* optional arrays of expected specific values */ | |
23 | const char **names; | |
24 | int *statuses; | |
25 | ||
26 | int debug; | |
27 | ||
3a437590 RB |
28 | } diff_expects; |
29 | ||
0d64ba48 | 30 | typedef struct { |
31 | const char *path; | |
32 | const char *matched_pathspec; | |
33 | } notify_expected; | |
34 | ||
cfbe4be3 | 35 | extern int diff_file_cb( |
bae957b9 | 36 | const git_diff_delta *delta, |
793c4385 RB |
37 | float progress, |
38 | void *cb_data); | |
3a437590 | 39 | |
ccfa6805 RB |
40 | extern int diff_print_file_cb( |
41 | const git_diff_delta *delta, | |
42 | float progress, | |
43 | void *cb_data); | |
44 | ||
8147b1af ET |
45 | extern int diff_binary_cb( |
46 | const git_diff_delta *delta, | |
47 | const git_diff_binary *binary, | |
48 | void *cb_data); | |
49 | ||
cfbe4be3 | 50 | extern int diff_hunk_cb( |
bae957b9 | 51 | const git_diff_delta *delta, |
3b5f7954 | 52 | const git_diff_hunk *hunk, |
793c4385 | 53 | void *cb_data); |
3a437590 | 54 | |
cfbe4be3 | 55 | extern int diff_line_cb( |
bae957b9 | 56 | const git_diff_delta *delta, |
3b5f7954 RB |
57 | const git_diff_hunk *hunk, |
58 | const git_diff_line *line, | |
793c4385 | 59 | void *cb_data); |
a2e895be | 60 | |
f335ecd6 | 61 | extern int diff_foreach_via_iterator( |
3ff1d123 | 62 | git_diff *diff, |
cfbe4be3 | 63 | git_diff_file_cb file_cb, |
8147b1af | 64 | git_diff_binary_cb binary_cb, |
cfbe4be3 | 65 | git_diff_hunk_cb hunk_cb, |
3ff1d123 | 66 | git_diff_line_cb line_cb, |
793c4385 | 67 | void *data); |
71966e2f | 68 | |
3ff1d123 RB |
69 | extern void diff_print(FILE *fp, git_diff *diff); |
70 | extern void diff_print_raw(FILE *fp, git_diff *diff); | |
e774d5af ET |
71 | |
72 | extern void diff_assert_equal(git_diff *a, git_diff *b); | |
73 |