MCPcopy Create free account
hub / github.com/libgit2/pygit2 / DiffOption

Class DiffOption

pygit2/enums.py:467–626  ·  view source on GitHub ↗

Flags for diff options. A combination of these flags can be passed in via the `flags` value in `diff_*` functions.

Source from the content-addressed store, hash-verified

465
466
467class DiffOption(IntFlag):
468 """
469 Flags for diff options. A combination of these flags can be passed
470 in via the `flags` value in `diff_*` functions.
471 """
472
473 NORMAL = _pygit2.GIT_DIFF_NORMAL
474 'Normal diff, the default'
475
476 REVERSE = _pygit2.GIT_DIFF_REVERSE
477 'Reverse the sides of the diff'
478
479 INCLUDE_IGNORED = _pygit2.GIT_DIFF_INCLUDE_IGNORED
480 'Include ignored files in the diff'
481
482 RECURSE_IGNORED_DIRS = _pygit2.GIT_DIFF_RECURSE_IGNORED_DIRS
483 """
484 Even with INCLUDE_IGNORED, an entire ignored directory
485 will be marked with only a single entry in the diff; this flag
486 adds all files under the directory as IGNORED entries, too.
487 """
488
489 INCLUDE_UNTRACKED = _pygit2.GIT_DIFF_INCLUDE_UNTRACKED
490 'Include untracked files in the diff'
491
492 RECURSE_UNTRACKED_DIRS = _pygit2.GIT_DIFF_RECURSE_UNTRACKED_DIRS
493 """
494 Even with INCLUDE_UNTRACKED, an entire untracked
495 directory will be marked with only a single entry in the diff
496 (a la what core Git does in `git status`); this flag adds *all*
497 files under untracked directories as UNTRACKED entries, too.
498 """
499
500 INCLUDE_UNMODIFIED = _pygit2.GIT_DIFF_INCLUDE_UNMODIFIED
501 'Include unmodified files in the diff'
502
503 INCLUDE_TYPECHANGE = _pygit2.GIT_DIFF_INCLUDE_TYPECHANGE
504 """
505 Normally, a type change between files will be converted into a
506 DELETED record for the old and an ADDED record for the new; this
507 options enabled the generation of TYPECHANGE delta records.
508 """
509
510 INCLUDE_TYPECHANGE_TREES = _pygit2.GIT_DIFF_INCLUDE_TYPECHANGE_TREES
511 """
512 Even with INCLUDE_TYPECHANGE, blob->tree changes still generally
513 show as a DELETED blob. This flag tries to correctly label
514 blob->tree transitions as TYPECHANGE records with new_file's
515 mode set to tree. Note: the tree SHA will not be available.
516 """
517
518 IGNORE_FILEMODE = _pygit2.GIT_DIFF_IGNORE_FILEMODE
519 'Ignore file mode changes'
520
521 IGNORE_SUBMODULES = _pygit2.GIT_DIFF_IGNORE_SUBMODULES
522 'Treat all submodules as unmodified'
523
524 IGNORE_CASE = _pygit2.GIT_DIFF_IGNORE_CASE

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…