diff options
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r-- | include/git2/diff.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h index db6bce2eb..315cc1215 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -468,6 +468,9 @@ typedef int (*git_diff_line_cb)( * Flags to control the behavior of diff rename/copy detection. */ typedef enum { + /** Obey `diff.renames`. This is overridden by any other GIT_DIFF_FIND_ALL flag. */ + GIT_DIFF_FIND_BY_CONFIG = 0, + /** Look for renames? (`--find-renames`) */ GIT_DIFF_FIND_RENAMES = (1u << 0), @@ -573,7 +576,11 @@ typedef struct { typedef struct { unsigned int version; - /** Combination of git_diff_find_t values (default FIND_RENAMES) */ + /** + * Combination of git_diff_find_t values (default FIND_BY_CONFIG). + * Note that if you don't explicitly set this, `diff.renames` could be set + * to false, resulting in `git_diff_find_similar` doing nothing. + */ uint32_t flags; /** Similarity to consider a file renamed (default 50) */ |