diff options
author | Russell Belfer <rb@github.com> | 2013-12-11 10:39:36 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-12-11 10:39:36 -0800 |
commit | 0eedacb06ae07fd0d784066ad41383276e05d92e (patch) | |
tree | 9db818d0db31172563c24aea6a283576a5b10ba7 /include/git2/diff.h | |
parent | 65e9dc659a013817d1adb3cdc1ed43e697cfbc54 (diff) | |
parent | 5a52d6be4c3a2635a3121b529e0ab2ab674f6be6 (diff) | |
download | libgit2-0eedacb06ae07fd0d784066ad41383276e05d92e.tar.gz |
Merge pull request #1985 from libgit2/diff-rename-config
Rename detection using diff.renames
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) */ |