Skip to content

Commit 5fa8f66

Browse files
committed
Update patch to git
1 parent 0382cd1 commit 5fa8f66

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

git-2.40.1.patch renamed to git-2.45.0.patch

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
diff --git a/git-xdiff.h b/git-xdiff.h
22
new file mode 100644
3-
index 0000000..d812d0d
3+
index 0000000..4091d22
44
--- /dev/null
55
+++ b/git-xdiff.h
6-
@@ -0,0 +1,63 @@
6+
@@ -0,0 +1,79 @@
77
+/*
88
+ * This file provides the necessary indirection between xdiff and
99
+ * the calling application. Callers can use this file to avoid modifying
@@ -22,7 +22,6 @@ index 0000000..d812d0d
2222
+#include <stdint.h>
2323
+#include <stdio.h>
2424
+#include <string.h>
25-
+#include <regex.h>
2625
+
2726
+/* Work around C90-conformance issues */
2827
+#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
@@ -53,8 +52,23 @@ index 0000000..d812d0d
5352
+
5453
+#define XDL_BUG(msg) do { fprintf(stderr, "fatal: %s\n", msg); exit(128); } while(0)
5554
+
56-
+#define xdl_regex_t regex_t
57-
+#define xdl_regmatch_t regmatch_t
55+
+#if defined(_MSC_VER) && !defined(XDL_REGEX)
56+
+
57+
+# define xdl_regex_t void *
58+
+# define xdl_regmatch_t void *
59+
+
60+
+inline int xdl_regexec_buf(
61+
+ const xdl_regex_t *preg, const char *buf, size_t size,
62+
+ size_t nmatch, xdl_regmatch_t pmatch[], int eflags)
63+
+{
64+
+ return 15; /* REG_ASSERT */
65+
+}
66+
+
67+
+#else
68+
+# include <regex.h>
69+
+
70+
+# define xdl_regex_t regex_t
71+
+# define xdl_regmatch_t regmatch_t
5872
+
5973
+inline int xdl_regexec_buf(
6074
+ const xdl_regex_t *preg, const char *buf, size_t size,
@@ -66,6 +80,8 @@ index 0000000..d812d0d
6680
+ return regexec(preg, buf, nmatch, pmatch, eflags | REG_STARTEND);
6781
+}
6882
+
83+
+#endif /* XDL_NO_REGEX */
84+
+
6985
+#endif
7086
diff --git a/xdiff.h b/xdiff.h
7187
index bb56b23..fb47f63 100644
@@ -197,3 +213,25 @@ index a4285ac..75db1d8 100644
197213
#include "xmacros.h"
198214
#include "xdiff.h"
199215
#include "xtypes.h"
216+
diff --git a/xmerge.c b/xmerge.c
217+
index af40c88..6ebf73a 100644
218+
--- a/xmerge.c
219+
+++ b/xmerge.c
220+
@@ -88,7 +88,7 @@ static int xdl_cleanup_merge(xdmerge_t *c)
221+
if (c->mode == 0)
222+
count++;
223+
next_c = c->next;
224+
- free(c);
225+
+ xdl_free(c);
226+
}
227+
return count;
228+
}
229+
@@ -456,7 +456,7 @@ static void xdl_merge_two_conflicts(xdmerge_t *m)
230+
m->chg1 = next_m->i1 + next_m->chg1 - m->i1;
231+
m->chg2 = next_m->i2 + next_m->chg2 - m->i2;
232+
m->next = next_m->next;
233+
- free(next_m);
234+
+ xdl_free(next_m);
235+
}
236+
237+
/*

0 commit comments

Comments
 (0)