]>
Commit | Line | Data |
---|---|---|
114f5a6c RB |
1 | /* |
2 | * Copyright (C) the libgit2 contributors. All rights reserved. | |
3 | * | |
4 | * This file is part of libgit2, distributed under the GNU GPL v2 with | |
5 | * a Linking Exception. For full terms see the included COPYING file. | |
6 | */ | |
7 | #ifndef INCLUDE_diff_xdiff_h__ | |
8 | #define INCLUDE_diff_xdiff_h__ | |
9 | ||
eae0bfdc PP |
10 | #include "common.h" |
11 | ||
114f5a6c | 12 | #include "diff.h" |
114f5a6c | 13 | #include "xdiff/xdiff.h" |
8d44f8b7 | 14 | #include "patch_generate.h" |
114f5a6c | 15 | |
6c014bcc ET |
16 | /* xdiff cannot cope with large files. these files should not be passed to |
17 | * xdiff. callers should treat these large files as binary. | |
18 | */ | |
c25aa7cd | 19 | #define GIT_XDIFF_MAX_SIZE (INT64_C(1024) * 1024 * 1023) |
6c014bcc | 20 | |
8d44f8b7 ET |
21 | /* A git_xdiff_output is a git_patch_generate_output with extra fields |
22 | * necessary to use libxdiff. Calling git_xdiff_init() will set the diff_cb | |
23 | * field of the output to use xdiff to generate the diffs. | |
114f5a6c RB |
24 | */ |
25 | typedef struct { | |
8d44f8b7 | 26 | git_patch_generated_output output; |
114f5a6c RB |
27 | |
28 | xdemitconf_t config; | |
29 | xpparam_t params; | |
30 | xdemitcb_t callback; | |
31 | } git_xdiff_output; | |
32 | ||
33 | void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts); | |
34 | ||
35 | #endif |