Flags to control the behavior of diff rename/copy detection.
Obey diff.renames
. Overridden by any other GIT_DIFF_FIND_... flag.
Look for renames? (--find-renames
)
Consider old side of MODIFIED for renames? (--break-rewrites=N
)
Look for copies? (a la --find-copies
).
Consider UNMODIFIED as copy sources? (--find-copies-harder
).
For this to work correctly, use GIT_DIFF_INCLUDE_UNMODIFIED when the initial git_diff
is being generated.
Mark significant rewrites for split (--break-rewrites=/M
)
Actually split large rewrites into delete/add pairs
Mark rewrites for split and break into delete/add pairs
Find renames/copies for UNTRACKED items in working directory.
For this to work correctly, use GIT_DIFF_INCLUDE_UNTRACKED when the initial git_diff
is being generated (and obviously the diff must be against the working directory for this to make sense).
Turn on all finding features.
Measure similarity ignoring leading whitespace (default)
Measure similarity ignoring all whitespace
Measure similarity including all data
Measure similarity only by comparing SHAs (fast and cheap)
Do not break rewrites unless they contribute to a rename.
Normally, GIT_DIFF_FIND_AND_BREAK_REWRITES will measure the self- similarity of modified files and split the ones that have changed a lot into a DELETE / ADD pair. Then the sides of that pair will be considered candidates for rename and copy detection.
If you add this flag in and the split pair is not used for an actual rename or copy, then the modified record will be restored to a regular MODIFIED record instead of being split.
Remove any UNMODIFIED deltas after find_similar is done.
Using GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED to emulate the --find-copies-harder behavior requires building a diff with the GIT_DIFF_INCLUDE_UNMODIFIED flag. If you do not want UNMODIFIED records in the final result, pass this flag to have them removed.