11diff --git a/git-xdiff.h b/git-xdiff.h
22new file mode 100644
3- index 0000000..4091d22
3+ index 0000000..e3a6ef8
44--- /dev/null
55+++ b/git-xdiff.h
66@@ -0,0 +1,79 @@
@@ -57,7 +57,7 @@ index 0000000..4091d22
5757+ # define xdl_regex_t void *
5858+ # define xdl_regmatch_t void *
5959+
60- + inline int xdl_regexec_buf(
60+ + static inline int xdl_regexec_buf(
6161+ const xdl_regex_t *preg, const char *buf, size_t size,
6262+ size_t nmatch, xdl_regmatch_t pmatch[], int eflags)
6363+ {
@@ -70,7 +70,7 @@ index 0000000..4091d22
7070+ # define xdl_regex_t regex_t
7171+ # define xdl_regmatch_t regmatch_t
7272+
73- + inline int xdl_regexec_buf(
73+ + static inline int xdl_regexec_buf(
7474+ const xdl_regex_t *preg, const char *buf, size_t size,
7575+ size_t nmatch, xdl_regmatch_t pmatch[], int eflags)
7676+ {
@@ -118,10 +118,10 @@ index bb56b23..fb47f63 100644
118118 long xdl_mmfile_size(mmfile_t *mmf);
119119
120120diff --git a/xdiffi.c b/xdiffi.c
121- index 344c2df..ea36143 100644
121+ index 4685ba6..7224739 100644
122122--- a/xdiffi.c
123123+++ b/xdiffi.c
124- @@ -833 ,7 +833 ,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
124+ @@ -834 ,7 +834 ,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
125125 /* Shift the group backward as much as possible: */
126126 while (!group_slide_up(xdf, &g))
127127 if (group_previous(xdfo, &go))
@@ -130,7 +130,7 @@ index 344c2df..ea36143 100644
130130
131131 /*
132132 * This is this highest that this group can be shifted.
133- @@ -849 ,7 +849 ,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
133+ @@ -850 ,7 +850 ,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
134134 if (group_slide_down(xdf, &g))
135135 break;
136136 if (group_next(xdfo, &go))
@@ -139,7 +139,7 @@ index 344c2df..ea36143 100644
139139
140140 if (go.end > go.start)
141141 end_matching_other = g.end;
142- @@ -874 ,9 +874 ,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
142+ @@ -875 ,9 +875 ,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
143143 */
144144 while (go.end == go.start) {
145145 if (group_slide_up(xdf, &g))
@@ -151,7 +151,7 @@ index 344c2df..ea36143 100644
151151 }
152152 } else if (flags & XDF_INDENT_HEURISTIC) {
153153 /*
154- @@ -917 ,9 +917 ,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
154+ @@ -918 ,9 +918 ,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
155155
156156 while (g.end > best_shift) {
157157 if (group_slide_up(xdf, &g))
@@ -163,7 +163,7 @@ index 344c2df..ea36143 100644
163163 }
164164 }
165165
166- @@ -928 ,11 +928 ,11 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
166+ @@ -929 ,11 +929 ,11 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
167167 if (group_next(xdf, &g))
168168 break;
169169 if (group_next(xdfo, &go))
@@ -177,7 +177,7 @@ index 344c2df..ea36143 100644
177177
178178 return 0;
179179 }
180- @@ -973 ,7 +973 ,7 @@ void xdl_free_script(xdchange_t *xscr) {
180+ @@ -974 ,7 +974 ,7 @@ void xdl_free_script(xdchange_t *xscr) {
181181 }
182182 }
183183
@@ -186,7 +186,7 @@ index 344c2df..ea36143 100644
186186 xdemitconf_t const *xecfg)
187187 {
188188 xdchange_t *xch, *xche;
189- @@ -1012 ,11 +1012 ,11 @@ static void xdl_mark_ignorable_lines(xdchange_t *xscr, xdfenv_t *xe, long flags)
189+ @@ -1013 ,11 +1013 ,11 @@ static void xdl_mark_ignorable_lines(xdchange_t *xscr, xdfenv_t *xe, long flags)
190190 }
191191
192192 static int record_matches_regex(xrecord_t *rec, xpparam_t const *xpp) {
@@ -201,15 +201,18 @@ index 344c2df..ea36143 100644
201201 return 1;
202202
203203diff --git a/xinclude.h b/xinclude.h
204- index a4285ac..75db1d8 100644
204+ index 7e56542..5163346 100644
205205--- a/xinclude.h
206206+++ b/xinclude.h
207- @@ -23,7 +23,7 @@
207+ @@ -23,9 +23,10 @@
208208 #if !defined(XINCLUDE_H)
209209 #define XINCLUDE_H
210210
211- - #include "git-compat-util.h"
212211+ #include "git-xdiff.h"
212+ +
213+ #define DISABLE_SIGN_COMPARE_WARNINGS
214+
215+ - #include "git-compat-util.h"
213216 #include "xmacros.h"
214217 #include "xdiff.h"
215218 #include "xtypes.h"
0 commit comments