|
338 | 338 | LibGit2.DiffOptionsStruct
|
339 | 339 |
|
340 | 340 | Matches the [`git_diff_options`](https://libgit2.github.com/libgit2/#HEAD/type/git_diff_options) struct.
|
| 341 | +
|
| 342 | +The fields represent: |
| 343 | + * `version`: version of the struct in use, in case this changes later. For now, always `1`. |
| 344 | + * `flags`: flags controlling which files will appear in the diff. Defaults to `DIFF_NORMAL`. |
| 345 | + * `ignore_submodules`: whether to look at files in submodules or not. Defaults to |
| 346 | + `SUBMODULE_IGNORE_UNSPECIFIED`, which means the submodule's configuration will control |
| 347 | + whether it appears in the diff or not. |
| 348 | + * `pathspec`: path to files to include in the diff. Default is to use all files in the repository. |
| 349 | + * `notify_cb`: optional callback which will notify the user of changes to the diff as file deltas are |
| 350 | + added to it. |
| 351 | + * `progress_cb`: optional callback which will display diff progress. Only relevant on libgit2 versions |
| 352 | + at least as new as 0.24.0. |
| 353 | + * `payload`: the payload to pass to `notify_cb` and `progress_cb`. |
| 354 | + * `context_lines`: the number of *unchanged* lines used to define the edges of a hunk. |
| 355 | + This is also the number of lines which will be shown before/after a hunk to provide |
| 356 | + context. Default is 3. |
| 357 | + * `interhunk_lines`: the maximum number of *unchanged* lines *between* two separate |
| 358 | + hunks allowed before the hunks will be combined. Default is 0. |
| 359 | + * `id_abbrev`: sets the length of the abbreviated [`GitHash`](@ref) to print. |
| 360 | + Default is `7`. |
| 361 | + * `max_size`: the maximum file size of a blob. Above this size, it will be treated |
| 362 | + as a binary blob. The default is 512 MB. |
| 363 | + * `old_prefix`: the virtual file directory in which to place old files on one side |
| 364 | + of the diff. Default is `"a"`. |
| 365 | + * `new_prefix`: the virtual file directory in which to place new files on one side |
| 366 | + of the diff. Default is `"b"`. |
341 | 367 | """
|
342 | 368 | @kwdef struct DiffOptionsStruct
|
343 | 369 | version::Cuint = Consts.DIFF_OPTIONS_VERSION
|
|
0 commit comments