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

Class DiffFind

pygit2/enums.py:362–438  ·  view source on GitHub ↗

Flags to control the behavior of diff rename/copy detection.

Source from the content-addressed store, hash-verified

360
361
362class DiffFind(IntFlag):
363 """Flags to control the behavior of diff rename/copy detection."""
364
365 FIND_BY_CONFIG = _pygit2.GIT_DIFF_FIND_BY_CONFIG
366 """ Obey ``diff.renames``. Overridden by any other ``FIND_...`` flag. """
367
368 FIND_RENAMES = _pygit2.GIT_DIFF_FIND_RENAMES
369 """ Look for renames? (`--find-renames`) """
370
371 FIND_RENAMES_FROM_REWRITES = _pygit2.GIT_DIFF_FIND_RENAMES_FROM_REWRITES
372 """ Consider old side of MODIFIED for renames? (`--break-rewrites=N`) """
373
374 FIND_COPIES = _pygit2.GIT_DIFF_FIND_COPIES
375 """ Look for copies? (a la `--find-copies`). """
376
377 FIND_COPIES_FROM_UNMODIFIED = _pygit2.GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED
378 """
379 Consider UNMODIFIED as copy sources? (`--find-copies-harder`).
380 For this to work correctly, use INCLUDE_UNMODIFIED when the initial
381 `Diff` is being generated.
382 """
383
384 FIND_REWRITES = _pygit2.GIT_DIFF_FIND_REWRITES
385 """ Mark significant rewrites for split (`--break-rewrites=/M`) """
386
387 BREAK_REWRITES = _pygit2.GIT_DIFF_BREAK_REWRITES
388 """ Actually split large rewrites into delete/add pairs """
389
390 FIND_AND_BREAK_REWRITES = _pygit2.GIT_DIFF_FIND_AND_BREAK_REWRITES
391 """ Mark rewrites for split and break into delete/add pairs """
392
393 FIND_FOR_UNTRACKED = _pygit2.GIT_DIFF_FIND_FOR_UNTRACKED
394 """
395 Find renames/copies for UNTRACKED items in working directory.
396 For this to work correctly, use INCLUDE_UNTRACKED when the initial
397 `Diff` is being generated (and obviously the diff must be against
398 the working directory for this to make sense).
399 """
400
401 FIND_ALL = _pygit2.GIT_DIFF_FIND_ALL
402 """ Turn on all finding features. """
403
404 FIND_IGNORE_LEADING_WHITESPACE = _pygit2.GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE
405 """ Measure similarity ignoring leading whitespace (default) """
406
407 FIND_IGNORE_WHITESPACE = _pygit2.GIT_DIFF_FIND_IGNORE_WHITESPACE
408 """ Measure similarity ignoring all whitespace """
409
410 FIND_DONT_IGNORE_WHITESPACE = _pygit2.GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE
411 """ Measure similarity including all data """
412
413 FIND_EXACT_MATCH_ONLY = _pygit2.GIT_DIFF_FIND_EXACT_MATCH_ONLY
414 """ Measure similarity only by comparing SHAs (fast and cheap) """
415
416 BREAK_REWRITES_FOR_RENAMES_ONLY = _pygit2.GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY
417 """
418 Do not break rewrites unless they contribute to a rename.
419

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…