]> git.proxmox.com Git - libgit2.git/blob - tests/libgit2/apply/apply_helpers.h
New upstream version 1.5.0+ds
[libgit2.git] / tests / libgit2 / apply / apply_helpers.h
1 #include "../merge/merge_helpers.h"
2
3 #define TEST_REPO_PATH "merge-recursive"
4
5 #define DIFF_MODIFY_TWO_FILES \
6 "diff --git a/asparagus.txt b/asparagus.txt\n" \
7 "index f516580..ffb36e5 100644\n" \
8 "--- a/asparagus.txt\n" \
9 "+++ b/asparagus.txt\n" \
10 "@@ -1 +1 @@\n" \
11 "-ASPARAGUS SOUP!\n" \
12 "+ASPARAGUS SOUP.\n" \
13 "diff --git a/veal.txt b/veal.txt\n" \
14 "index 94d2c01..a7b0665 100644\n" \
15 "--- a/veal.txt\n" \
16 "+++ b/veal.txt\n" \
17 "@@ -1 +1 @@\n" \
18 "-VEAL SOUP!\n" \
19 "+VEAL SOUP.\n" \
20 "@@ -7 +7 @@ occasionally, then put into it a shin of veal, let it boil two hours\n" \
21 "-longer. take out the slices of ham, and skim off the grease if any\n" \
22 "+longer; take out the slices of ham, and skim off the grease if any\n"
23
24 /* This is the binary equivalent of DIFF_MODIFY_TWO_FILES */
25 #define DIFF_MODIFY_TWO_FILES_BINARY \
26 "diff --git a/asparagus.txt b/asparagus.txt\n" \
27 "index f51658077d85f2264fa179b4d0848268cb3475c3..ffb36e513f5fdf8a6ba850a20142676a2ac4807d 100644\n" \
28 "GIT binary patch\n" \
29 "delta 24\n" \
30 "fcmX@ja+-zTF*v|6$k9DCSRvRyG(c}7zYP-rT_OhP\n" \
31 "\n" \
32 "delta 24\n" \
33 "fcmX@ja+-zTF*v|6$k9DCSRvRyG(d49zYP-rT;T@W\n" \
34 "\n" \
35 "diff --git a/veal.txt b/veal.txt\n" \
36 "index 94d2c01087f48213bd157222d54edfefd77c9bba..a7b066537e6be7109abfe4ff97b675d4e077da20 100644\n" \
37 "GIT binary patch\n" \
38 "delta 26\n" \
39 "hcmX@kah!uI%+=9HA=p1OKyM?L03)OIW@$zpW&mXg25bNT\n" \
40 "\n" \
41 "delta 26\n" \
42 "hcmX@kah!uI%+=9HA=p1OKyf3N03)N`W@$zpW&mU#22ub3\n" \
43 "\n"
44
45 #define DIFF_DELETE_FILE \
46 "diff --git a/gravy.txt b/gravy.txt\n" \
47 "deleted file mode 100644\n" \
48 "index c4e6cca..0000000\n" \
49 "--- a/gravy.txt\n" \
50 "+++ /dev/null\n" \
51 "@@ -1,8 +0,0 @@\n" \
52 "-GRAVY SOUP.\n" \
53 "-\n" \
54 "-Get eight pounds of coarse lean beef--wash it clean and lay it in your\n" \
55 "-pot, put in the same ingredients as for the shin soup, with the same\n" \
56 "-quantity of water, and follow the process directed for that. Strain the\n" \
57 "-soup through a sieve, and serve it up clear, with nothing more than\n" \
58 "-toasted bread in it; two table-spoonsful of mushroom catsup will add a\n" \
59 "-fine flavour to the soup.\n"
60
61 #define DIFF_ADD_FILE \
62 "diff --git a/newfile.txt b/newfile.txt\n" \
63 "new file mode 100644\n" \
64 "index 0000000..6370543\n" \
65 "--- /dev/null\n" \
66 "+++ b/newfile.txt\n" \
67 "@@ -0,0 +1,2 @@\n" \
68 "+This is a new file!\n" \
69 "+Added by a patch.\n"
70
71 #define DIFF_EXECUTABLE_FILE \
72 "diff --git a/beef.txt b/beef.txt\n" \
73 "old mode 100644\n" \
74 "new mode 100755\n"
75
76 #define DIFF_MANY_CHANGES_ONE \
77 "diff --git a/veal.txt b/veal.txt\n" \
78 "index 94d2c01..c9d7d5d 100644\n" \
79 "--- a/veal.txt\n" \
80 "+++ b/veal.txt\n" \
81 "@@ -1,2 +1,2 @@\n" \
82 "-VEAL SOUP!\n" \
83 "+VEAL SOUP\n" \
84 " \n" \
85 "@@ -4,3 +4,2 @@\n" \
86 " spoonful of black pepper pounded, and two of salt, with two or three\n" \
87 "-slices of lean ham; let it boil steadily two hours; skim it\n" \
88 " occasionally, then put into it a shin of veal, let it boil two hours\n" \
89 "@@ -8,3 +7,3 @@\n" \
90 " should rise, take a gill of good cream, mix with it two table-spoonsful\n" \
91 "-of flour very nicely, and the yelks of two eggs beaten well, strain this\n" \
92 "+OF FLOUR very nicely, and the yelks of two eggs beaten well, strain this\n" \
93 " mixture, and add some chopped parsley; pour some soup on by degrees,\n" \
94 "@@ -12,2 +11,3 @@\n" \
95 " boiled two or three minutes to take off the raw taste of the eggs. If\n" \
96 "+Inserted line.\n" \
97 " the cream be not perfectly sweet, and the eggs quite new, the thickening\n" \
98 "@@ -15,3 +15,3 @@\n" \
99 " in, first taking off their skins, by letting them stand a few minutes in\n" \
100 "-hot water, when they may be easily peeled. When made in this way you\n" \
101 "+Changed line.\n" \
102 " must thicken it with the flour only. Any part of the veal may be used,\n"
103
104 #define DIFF_MANY_CHANGES_TWO \
105 "diff --git a/veal.txt b/veal.txt\n" \
106 "index 94d2c01..6b943d6 100644\n" \
107 "--- a/veal.txt\n" \
108 "+++ b/veal.txt\n" \
109 "@@ -1,2 +1,2 @@\n" \
110 "-VEAL SOUP!\n" \
111 "+VEAL SOUP!!!\n" \
112 " \n" \
113 "@@ -4,3 +4,2 @@\n" \
114 " spoonful of black pepper pounded, and two of salt, with two or three\n" \
115 "-slices of lean ham; let it boil steadily two hours; skim it\n" \
116 " occasionally, then put into it a shin of veal, let it boil two hours\n" \
117 "@@ -8,3 +7,3 @@\n" \
118 " should rise, take a gill of good cream, mix with it two table-spoonsful\n" \
119 "-of flour very nicely, and the yelks of two eggs beaten well, strain this\n" \
120 "+of flour very nicely, AND the yelks of two eggs beaten well, strain this\n" \
121 " mixture, and add some chopped parsley; pour some soup on by degrees,\n" \
122 "@@ -12,2 +11,3 @@\n" \
123 " boiled two or three minutes to take off the raw taste of the eggs. If\n" \
124 "+New line.\n" \
125 " the cream be not perfectly sweet, and the eggs quite new, the thickening\n" \
126 "@@ -15,4 +15,5 @@\n" \
127 " in, first taking off their skins, by letting them stand a few minutes in\n" \
128 "-hot water, when they may be easily peeled. When made in this way you\n" \
129 "-must thicken it with the flour only. Any part of the veal may be used,\n" \
130 "-but the shin or knuckle is the nicest.\n" \
131 "+HOT water, when they may be easily peeled. When made in this way you\n" \
132 "+must THICKEN it with the flour only. Any part of the veal may be used,\n" \
133 "+but the shin OR knuckle is the nicest.\n" \
134 "+Another new line.\n" \
135
136 #define DIFF_RENAME_FILE \
137 "diff --git a/beef.txt b/notbeef.txt\n" \
138 "similarity index 100%\n" \
139 "rename from beef.txt\n" \
140 "rename to notbeef.txt\n"
141
142 #define DIFF_RENAME_AND_MODIFY_FILE \
143 "diff --git a/beef.txt b/notbeef.txt\n" \
144 "similarity index 97%\n" \
145 "rename from beef.txt\n" \
146 "rename to notbeef.txt\n" \
147 "index 68f6182..6fa1014 100644\n" \
148 "--- a/beef.txt\n" \
149 "+++ b/notbeef.txt\n" \
150 "@@ -1,4 +1,4 @@\n" \
151 "-BEEF SOUP.\n" \
152 "+THIS IS NOT BEEF SOUP, IT HAS A NEW NAME.\n" \
153 "\n" \
154 " Take the hind shin of beef, cut off all the flesh off the leg-bone,\n" \
155 " which must be taken away entirely, or the soup will be greasy. Wash the\n"
156
157 #define DIFF_RENAME_A_TO_B_TO_C \
158 "diff --git a/asparagus.txt b/asparagus.txt\n" \
159 "deleted file mode 100644\n" \
160 "index f516580..0000000\n" \
161 "--- a/asparagus.txt\n" \
162 "+++ /dev/null\n" \
163 "@@ -1,10 +0,0 @@\n" \
164 "-ASPARAGUS SOUP!\n" \
165 "-\n" \
166 "-Take four large bunches of asparagus, scrape it nicely, cut off one inch\n" \
167 "-of the tops, and lay them in water, chop the stalks and put them on the\n" \
168 "-fire with a piece of bacon, a large onion cut up, and pepper and salt;\n" \
169 "-add two quarts of water, boil them till the stalks are quite soft, then\n" \
170 "-pulp them through a sieve, and strain the water to it, which must be put\n" \
171 "-back in the pot; put into it a chicken cut up, with the tops of\n" \
172 "-asparagus which had been laid by, boil it until these last articles are\n" \
173 "-sufficiently done, thicken with flour, butter and milk, and serve it up.\n" \
174 "diff --git a/beef.txt b/beef.txt\n" \
175 "index 68f6182..f516580 100644\n" \
176 "--- a/beef.txt\n" \
177 "+++ b/beef.txt\n" \
178 "@@ -1,22 +1,10 @@\n" \
179 "-BEEF SOUP.\n" \
180 "+ASPARAGUS SOUP!\n" \
181 "\n" \
182 "-Take the hind shin of beef, cut off all the flesh off the leg-bone,\n" \
183 "-which must be taken away entirely, or the soup will be greasy. Wash the\n" \
184 "-meat clean and lay it in a pot, sprinkle over it one small\n" \
185 "-table-spoonful of pounded black pepper, and two of salt; three onions\n" \
186 "-the size of a hen's egg, cut small, six small carrots scraped and cut\n" \
187 "-up, two small turnips pared and cut into dice; pour on three quarts of\n" \
188 "-water, cover the pot close, and keep it gently and steadily boiling five\n" \
189 "-hours, which will leave about three pints of clear soup; do not let the\n" \
190 "-pot boil over, but take off the scum carefully, as it rises. When it has\n" \
191 "-boiled four hours, put in a small bundle of thyme and parsley, and a\n" \
192 "-pint of celery cut small, or a tea-spoonful of celery seed pounded.\n" \
193 "-These latter ingredients would lose their delicate flavour if boiled too\n" \
194 "-much. Just before you take it up, brown it in the following manner: put\n" \
195 "-a small table-spoonful of nice brown sugar into an iron skillet, set it\n" \
196 "-on the fire and stir it till it melts and looks very dark, pour into it\n" \
197 "-a ladle full of the soup, a little at a time; stirring it all the while.\n" \
198 "-Strain this browning and mix it well with the soup; take out the bundle\n" \
199 "-of thyme and parsley, put the nicest pieces of meat in your tureen, and\n" \
200 "-pour on the soup and vegetables; put in some toasted bread cut in dice,\n" \
201 "-and serve it up.\n" \
202 "+Take four large bunches of asparagus, scrape it nicely, cut off one inch\n" \
203 "+of the tops, and lay them in water, chop the stalks and put them on the\n" \
204 "+fire with a piece of bacon, a large onion cut up, and pepper and salt;\n" \
205 "+add two quarts of water, boil them till the stalks are quite soft, then\n" \
206 "+pulp them through a sieve, and strain the water to it, which must be put\n" \
207 "+back in the pot; put into it a chicken cut up, with the tops of\n" \
208 "+asparagus which had been laid by, boil it until these last articles are\n" \
209 "+sufficiently done, thicken with flour, butter and milk, and serve it up.\n" \
210 "diff --git a/notbeef.txt b/notbeef.txt\n" \
211 "new file mode 100644\n" \
212 "index 0000000..68f6182\n" \
213 "--- /dev/null\n" \
214 "+++ b/notbeef.txt\n" \
215 "@@ -0,0 +1,22 @@\n" \
216 "+BEEF SOUP.\n" \
217 "+\n" \
218 "+Take the hind shin of beef, cut off all the flesh off the leg-bone,\n" \
219 "+which must be taken away entirely, or the soup will be greasy. Wash the\n" \
220 "+meat clean and lay it in a pot, sprinkle over it one small\n" \
221 "+table-spoonful of pounded black pepper, and two of salt; three onions\n" \
222 "+the size of a hen's egg, cut small, six small carrots scraped and cut\n" \
223 "+up, two small turnips pared and cut into dice; pour on three quarts of\n" \
224 "+water, cover the pot close, and keep it gently and steadily boiling five\n" \
225 "+hours, which will leave about three pints of clear soup; do not let the\n" \
226 "+pot boil over, but take off the scum carefully, as it rises. When it has\n" \
227 "+boiled four hours, put in a small bundle of thyme and parsley, and a\n" \
228 "+pint of celery cut small, or a tea-spoonful of celery seed pounded.\n" \
229 "+These latter ingredients would lose their delicate flavour if boiled too\n" \
230 "+much. Just before you take it up, brown it in the following manner: put\n" \
231 "+a small table-spoonful of nice brown sugar into an iron skillet, set it\n" \
232 "+on the fire and stir it till it melts and looks very dark, pour into it\n" \
233 "+a ladle full of the soup, a little at a time; stirring it all the while.\n" \
234 "+Strain this browning and mix it well with the soup; take out the bundle\n" \
235 "+of thyme and parsley, put the nicest pieces of meat in your tureen, and\n" \
236 "+pour on the soup and vegetables; put in some toasted bread cut in dice,\n" \
237 "+and serve it up.\n"
238
239 #define DIFF_RENAME_A_TO_B_TO_C_EXACT \
240 "diff --git a/asparagus.txt b/beef.txt\n" \
241 "similarity index 100%\n" \
242 "rename from asparagus.txt\n" \
243 "rename to beef.txt\n" \
244 "diff --git a/beef.txt b/notbeef.txt\n" \
245 "similarity index 100%\n" \
246 "rename from beef.txt\n" \
247 "rename to notbeef.txt\n"
248
249 #define DIFF_RENAME_CIRCULAR \
250 "diff --git a/asparagus.txt b/beef.txt\n" \
251 "similarity index 100%\n" \
252 "rename from asparagus.txt\n" \
253 "rename to beef.txt\n" \
254 "diff --git a/beef.txt b/notbeef.txt\n" \
255 "similarity index 100%\n" \
256 "rename from beef.txt\n" \
257 "rename to asparagus.txt\n"
258
259 #define DIFF_RENAME_2_TO_1 \
260 "diff --git a/asparagus.txt b/2.txt\n" \
261 "similarity index 100%\n" \
262 "rename from asparagus.txt\n" \
263 "rename to 2.txt\n" \
264 "diff --git a/beef.txt b/2.txt\n" \
265 "similarity index 100%\n" \
266 "rename from beef.txt\n" \
267 "rename to 2.txt\n"
268
269 #define DIFF_RENAME_1_TO_2 \
270 "diff --git a/asparagus.txt b/2.txt\n" \
271 "similarity index 100%\n" \
272 "rename from asparagus.txt\n" \
273 "rename to 1.txt\n" \
274 "diff --git a/asparagus.txt b/2.txt\n" \
275 "similarity index 100%\n" \
276 "rename from asparagus.txt\n" \
277 "rename to 2.txt\n"
278
279 #define DIFF_TWO_DELTAS_ONE_FILE \
280 "diff --git a/beef.txt b/beef.txt\n" \
281 "index 68f6182..235069d 100644\n" \
282 "--- a/beef.txt\n" \
283 "+++ b/beef.txt\n" \
284 "@@ -1,4 +1,4 @@\n" \
285 "-BEEF SOUP.\n" \
286 "+BEEF SOUP!\n" \
287 "\n" \
288 " Take the hind shin of beef, cut off all the flesh off the leg-bone,\n" \
289 " which must be taken away entirely, or the soup will be greasy. Wash the\n" \
290 "diff --git a/beef.txt b/beef.txt\n" \
291 "index 68f6182..e059eb5 100644\n" \
292 "--- a/beef.txt\n" \
293 "+++ b/beef.txt\n" \
294 "@@ -19,4 +19,4 @@ a ladle full of the soup, a little at a time; stirring it all the while.\n" \
295 " Strain this browning and mix it well with the soup; take out the bundle\n" \
296 " of thyme and parsley, put the nicest pieces of meat in your tureen, and\n" \
297 " pour on the soup and vegetables; put in some toasted bread cut in dice,\n" \
298 "-and serve it up.\n" \
299 "+and serve it up!\n"
300
301 #define DIFF_TWO_DELTAS_ONE_NEW_FILE \
302 "diff --git a/newfile.txt b/newfile.txt\n" \
303 "new file mode 100644\n" \
304 "index 0000000..6434b13\n" \
305 "--- /dev/null\n" \
306 "+++ b/newfile.txt\n" \
307 "@@ -0,0 +1 @@\n" \
308 "+This is a new file.\n" \
309 "diff --git a/newfile.txt b/newfile.txt\n" \
310 "index 6434b13..08d4c44 100644\n" \
311 "--- a/newfile.txt\n" \
312 "+++ b/newfile.txt\n" \
313 "@@ -1 +1,3 @@\n" \
314 " This is a new file.\n" \
315 "+\n" \
316 "+This is another change to a new file.\n"
317
318 #define DIFF_RENAME_AND_MODIFY_DELTAS \
319 "diff --git a/veal.txt b/asdf.txt\n" \
320 "similarity index 96%\n" \
321 "rename from veal.txt\n" \
322 "rename to asdf.txt\n" \
323 "index 94d2c01..292cb60 100644\n" \
324 "--- a/veal.txt\n" \
325 "+++ b/asdf.txt\n" \
326 "@@ -15,4 +15,4 @@ will curdle in the soup. For a change you may put a dozen ripe tomatos\n" \
327 " in, first taking off their skins, by letting them stand a few minutes in\n" \
328 " hot water, when they may be easily peeled. When made in this way you\n" \
329 " must thicken it with the flour only. Any part of the veal may be used,\n" \
330 "-but the shin or knuckle is the nicest.\n" \
331 "+but the shin or knuckle is the nicest!\n" \
332 "diff --git a/asdf.txt b/asdf.txt\n" \
333 "index 292cb60..61c686b 100644\n" \
334 "--- a/asdf.txt\n" \
335 "+++ b/asdf.txt\n" \
336 "@@ -1,4 +1,4 @@\n" \
337 "-VEAL SOUP!\n" \
338 "+VEAL SOUP\n" \
339 "\n" \
340 " Put into a pot three quarts of water, three onions cut small, one\n" \
341 " spoonful of black pepper pounded, and two of salt, with two or three\n"
342
343 #define DIFF_RENAME_AFTER_MODIFY \
344 "diff --git a/veal.txt b/veal.txt\n" \
345 "index 292cb60..61c686b 100644\n" \
346 "--- a/veal.txt\n" \
347 "+++ b/veal.txt\n" \
348 "@@ -1,4 +1,4 @@\n" \
349 "-VEAL SOUP!\n" \
350 "+VEAL SOUP\n" \
351 "\n" \
352 " Put into a pot three quarts of water, three onions cut small, one\n" \
353 " spoonful of black pepper pounded, and two of salt, with two or three\n" \
354 "diff --git a/veal.txt b/other.txt\n" \
355 "similarity index 96%\n" \
356 "rename from veal.txt\n" \
357 "rename to other.txt\n" \
358 "index 94d2c01..292cb60 100644\n" \
359 "--- a/veal.txt\n" \
360 "+++ b/other.txt\n" \
361 "@@ -15,4 +15,4 @@ will curdle in the soup. For a change you may put a dozen ripe tomatos\n" \
362 " in, first taking off their skins, by letting them stand a few minutes in\n" \
363 " hot water, when they may be easily peeled. When made in this way you\n" \
364 " must thicken it with the flour only. Any part of the veal may be used,\n" \
365 "-but the shin or knuckle is the nicest.\n" \
366 "+but the shin or knuckle is the nicest!\n"
367
368 #define DIFF_RENAME_AFTER_MODIFY_TARGET_PATH \
369 "diff --git a/beef.txt b/beef.txt\n" \
370 "index 292cb60..61c686b 100644\n" \
371 "--- a/beef.txt\n" \
372 "+++ b/beef.txt\n" \
373 "@@ -1,4 +1,4 @@\n" \
374 "-VEAL SOUP!\n" \
375 "+VEAL SOUP\n" \
376 "\n" \
377 " Put into a pot three quarts of water, three onions cut small, one\n" \
378 " spoonful of black pepper pounded, and two of salt, with two or three\n" \
379 "diff --git a/veal.txt b/beef.txt\n" \
380 "similarity index 96%\n" \
381 "rename from veal.txt\n" \
382 "rename to beef.txt\n" \
383 "index 94d2c01..292cb60 100644\n" \
384 "--- a/veal.txt\n" \
385 "+++ b/beef.txt\n" \
386 "@@ -15,4 +15,4 @@ will curdle in the soup. For a change you may put a dozen ripe tomatos\n" \
387 " in, first taking off their skins, by letting them stand a few minutes in\n" \
388 " hot water, when they may be easily peeled. When made in this way you\n" \
389 " must thicken it with the flour only. Any part of the veal may be used,\n" \
390 "-but the shin or knuckle is the nicest.\n" \
391 "+but the shin or knuckle is the nicest!\n"
392
393 #define DIFF_RENAME_AND_MODIFY_SOURCE_PATH \
394 "diff --git a/veal.txt b/asdf.txt\n" \
395 "similarity index 96%\n" \
396 "rename from veal.txt\n" \
397 "rename to asdf.txt\n" \
398 "index 94d2c01..292cb60 100644\n" \
399 "--- a/veal.txt\n" \
400 "+++ b/asdf.txt\n" \
401 "@@ -15,4 +15,4 @@ will curdle in the soup. For a change you may put a dozen ripe tomatos\n" \
402 " in, first taking off their skins, by letting them stand a few minutes in\n" \
403 " hot water, when they may be easily peeled. When made in this way you\n" \
404 " must thicken it with the flour only. Any part of the veal may be used,\n" \
405 "-but the shin or knuckle is the nicest.\n" \
406 "+but the shin or knuckle is the nicest!\n" \
407 "diff --git a/veal.txt b/veal.txt\n" \
408 "index 292cb60..61c686b 100644\n" \
409 "--- a/veal.txt\n" \
410 "+++ b/veal.txt\n" \
411 "@@ -1,4 +1,4 @@\n" \
412 "-VEAL SOUP!\n" \
413 "+VEAL SOUP\n" \
414 "\n" \
415 " Put into a pot three quarts of water, three onions cut small, one\n" \
416 " spoonful of black pepper pounded, and two of salt, with two or three\n"
417
418 #define DIFF_DELETE_AND_READD_FILE \
419 "diff --git a/asparagus.txt b/asparagus.txt\n" \
420 "deleted file mode 100644\n" \
421 "index f516580..0000000\n" \
422 "--- a/asparagus.txt\n" \
423 "+++ /dev/null\n" \
424 "@@ -1,10 +0,0 @@\n" \
425 "-ASPARAGUS SOUP!\n" \
426 "-\n" \
427 "-Take four large bunches of asparagus, scrape it nicely, cut off one inch\n" \
428 "-of the tops, and lay them in water, chop the stalks and put them on the\n" \
429 "-fire with a piece of bacon, a large onion cut up, and pepper and salt;\n" \
430 "-add two quarts of water, boil them till the stalks are quite soft, then\n" \
431 "-pulp them through a sieve, and strain the water to it, which must be put\n" \
432 "-back in the pot; put into it a chicken cut up, with the tops of\n" \
433 "-asparagus which had been laid by, boil it until these last articles are\n" \
434 "-sufficiently done, thicken with flour, butter and milk, and serve it up.\n" \
435 "diff --git a/asparagus.txt b/asparagus.txt\n" \
436 "new file mode 100644\n" \
437 "index 0000000..2dc7f8b\n" \
438 "--- /dev/null\n" \
439 "+++ b/asparagus.txt\n" \
440 "@@ -0,0 +1 @@\n" \
441 "+New file.\n" \
442
443 #define DIFF_REMOVE_FILE_TWICE \
444 "diff --git a/asparagus.txt b/asparagus.txt\n" \
445 "deleted file mode 100644\n" \
446 "index f516580..0000000\n" \
447 "--- a/asparagus.txt\n" \
448 "+++ /dev/null\n" \
449 "@@ -1,10 +0,0 @@\n" \
450 "-ASPARAGUS SOUP!\n" \
451 "-\n" \
452 "-Take four large bunches of asparagus, scrape it nicely, cut off one inch\n" \
453 "-of the tops, and lay them in water, chop the stalks and put them on the\n" \
454 "-fire with a piece of bacon, a large onion cut up, and pepper and salt;\n" \
455 "-add two quarts of water, boil them till the stalks are quite soft, then\n" \
456 "-pulp them through a sieve, and strain the water to it, which must be put\n" \
457 "-back in the pot; put into it a chicken cut up, with the tops of\n" \
458 "-asparagus which had been laid by, boil it until these last articles are\n" \
459 "-sufficiently done, thicken with flour, butter and milk, and serve it up.\n" \
460 "diff --git a/asparagus.txt b/asparagus.txt\n" \
461 "deleted file mode 100644\n" \
462 "index f516580..0000000\n" \
463 "--- a/asparagus.txt\n" \
464 "+++ /dev/null\n" \
465 "@@ -1,10 +0,0 @@\n" \
466 "-ASPARAGUS SOUP!\n" \
467 "-\n" \
468 "-Take four large bunches of asparagus, scrape it nicely, cut off one inch\n" \
469 "-of the tops, and lay them in water, chop the stalks and put them on the\n" \
470 "-fire with a piece of bacon, a large onion cut up, and pepper and salt;\n" \
471 "-add two quarts of water, boil them till the stalks are quite soft, then\n" \
472 "-pulp them through a sieve, and strain the water to it, which must be put\n" \
473 "-back in the pot; put into it a chicken cut up, with the tops of\n" \
474 "-asparagus which had been laid by, boil it until these last articles are\n" \
475 "-sufficiently done, thicken with flour, butter and milk, and serve it up.\n"
476
477 #define DIFF_ADD_INVALID_FILENAME \
478 "diff --git a/.git/hello_world.txt b/.git/hello_world.txt\n" \
479 "new file mode 100644\n" \
480 "index 0000000..f75ba05\n" \
481 "--- /dev/null\n" \
482 "+++ b/.git/hello_world.txt\n" \
483 "@@ -0,0 +1 @@\n" \
484 "+Hello, world.\n"
485
486 void validate_apply_workdir(
487 git_repository *repo,
488 struct merge_index_entry *workdir_entries,
489 size_t workdir_cnt);
490
491 void validate_apply_index(
492 git_repository *repo,
493 struct merge_index_entry *index_entries,
494 size_t index_cnt);
495
496 void validate_index_unchanged(git_repository *repo);
497 void validate_workdir_unchanged(git_repository *repo);