@@ -185,6 +185,88 @@ public static extern int git_config_set_string(
185
185
[ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalTypeRef = typeof ( Utf8Marshaler ) ) ] string name ,
186
186
[ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalTypeRef = typeof ( Utf8Marshaler ) ) ] string value ) ;
187
187
188
+ [ DllImport ( libgit2 ) ]
189
+ public static extern void git_diff_list_free ( IntPtr diff ) ;
190
+
191
+ [ DllImport ( libgit2 ) ]
192
+ public static extern int git_diff_tree_to_tree (
193
+ RepositorySafeHandle repo ,
194
+ GitDiffOptions options ,
195
+ GitObjectSafeHandle oldTree ,
196
+ GitObjectSafeHandle newTree ,
197
+ out DiffListSafeHandle diff ) ;
198
+
199
+ [ DllImport ( libgit2 ) ]
200
+ public static extern int git_diff_index_to_tree (
201
+ RepositorySafeHandle repo ,
202
+ GitDiffOptions options ,
203
+ IntPtr oldTree ,
204
+ out IntPtr diff ) ;
205
+
206
+ [ DllImport ( libgit2 ) ]
207
+ public static extern int git_diff_workdir_to_index (
208
+ RepositorySafeHandle repo ,
209
+ GitDiffOptions options ,
210
+ out IntPtr diff ) ;
211
+
212
+ [ DllImport ( libgit2 ) ]
213
+ public static extern int git_diff_workdir_to_tree (
214
+ RepositorySafeHandle repo ,
215
+ GitDiffOptions options ,
216
+ IntPtr oldTree ,
217
+ out IntPtr diff ) ;
218
+
219
+ [ DllImport ( libgit2 ) ]
220
+ public static extern int git_diff_merge ( IntPtr onto , IntPtr from ) ;
221
+
222
+ internal delegate int git_diff_file_fn (
223
+ IntPtr data ,
224
+ GitDiffDelta delta ,
225
+ float progress ) ;
226
+
227
+ internal delegate int git_diff_hunk_fn (
228
+ IntPtr data ,
229
+ GitDiffDelta delta ,
230
+ GitDiffRange range ,
231
+ [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalTypeRef = typeof ( Utf8Marshaler ) ) ] string header ,
232
+ IntPtr headerLen ) ;
233
+
234
+ internal delegate int git_diff_line_fn (
235
+ IntPtr data ,
236
+ GitDiffDelta delta ,
237
+ GitDiffLineOrigin lineOrigin ,
238
+ IntPtr content ,
239
+ IntPtr contentLen ) ;
240
+
241
+ [ DllImport ( libgit2 ) ]
242
+ public static extern int git_diff_foreach (
243
+ DiffListSafeHandle diff ,
244
+ IntPtr callbackData ,
245
+ git_diff_file_fn fileCallback ,
246
+ git_diff_hunk_fn hunkCallback ,
247
+ git_diff_line_fn lineCallback ) ;
248
+
249
+ internal delegate int git_diff_output_fn (
250
+ IntPtr data ,
251
+ GitDiffLineOrigin lineOrigin ,
252
+ [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalTypeRef = typeof ( Utf8Marshaler ) ) ] string formattedOutput ) ;
253
+
254
+ [ DllImport ( libgit2 ) ]
255
+ public static extern int git_diff_print_patch (
256
+ DiffListSafeHandle diff ,
257
+ IntPtr data ,
258
+ git_diff_output_fn printCallback ) ;
259
+
260
+ [ DllImport ( libgit2 ) ]
261
+ public static extern int git_diff_blobs (
262
+ RepositorySafeHandle repository ,
263
+ IntPtr oldBlob ,
264
+ IntPtr newBlob ,
265
+ GitDiffOptions options ,
266
+ object data ,
267
+ git_diff_hunk_fn hunkCallback ,
268
+ git_diff_line_fn lineCallback ) ;
269
+
188
270
[ DllImport ( libgit2 ) ]
189
271
public static extern int git_index_add (
190
272
IndexSafeHandle index ,
0 commit comments