diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2016-03-08 17:23:00 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2016-03-08 17:23:00 +0300 |
commit | 17cbab953ae626685cc045fff08954c9d3a0389e (patch) | |
tree | f19da7c54ec5865f3dc71c06c31f2e220b9a5646 /include/git2 | |
parent | b7809b84692b4df7f11d603cc5da0860609e0555 (diff) | |
parent | ab8e88a96b5b9e1a59a6f8742fe0136b13158717 (diff) |
Merge commit 'ab8e88a96b5b9e1a59a6f8742fe0136b13158717' into xs-6.0-v2xs-6.0-v2
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/blame.h | 12 | ||||
-rw-r--r-- | include/git2/diff.h | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/git2/blame.h b/include/git2/blame.h index 84bb7f94c..f33a38933 100644 --- a/include/git2/blame.h +++ b/include/git2/blame.h @@ -9,6 +9,7 @@ #define INCLUDE_git_blame_h__ #include "common.h" +#include "diff.h" #include "oid.h" /** @@ -52,6 +53,9 @@ typedef enum { * `GIT_BLAME_OPTIONS_INIT` macro: * git_blame_options opts = GIT_BLAME_OPTIONS_INIT; * + *- `find_options` specifies what strategies should be used for + * rename detection. The default is rename with threshold + * heuristics. * - `flags` is a combination of the `git_blame_flag_t` values above. * - `min_match_characters` is the lower bound on the number of alphanumeric * characters that must be detected as moving/copying within a file for it to @@ -70,6 +74,8 @@ typedef enum { typedef struct git_blame_options { unsigned int version; + git_diff_find_options find_options; + uint32_t flags; uint16_t min_match_characters; git_oid newest_commit; @@ -78,8 +84,12 @@ typedef struct git_blame_options { size_t max_line; } git_blame_options; +#define GIT_BLAME_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION, \ + GIT_DIFF_FIND_RENAMES } + #define GIT_BLAME_OPTIONS_VERSION 1 -#define GIT_BLAME_OPTIONS_INIT {GIT_BLAME_OPTIONS_VERSION} +#define GIT_BLAME_OPTIONS_INIT {GIT_BLAME_OPTIONS_VERSION, \ + GIT_BLAME_DIFF_FIND_OPTIONS_INIT } /** * Initializes a `git_blame_options` with default values. Equivalent to diff --git a/include/git2/diff.h b/include/git2/diff.h index c35701a46..67ce666ef 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -611,6 +611,9 @@ typedef enum { /** Turn on all finding features. */ GIT_DIFF_FIND_ALL = (0x0ff), + /** Does no work on trying to find renames. */ + GIT_DIFF_FIND_NO_RENAMES = (1u << 8), + /** Measure similarity ignoring leading whitespace (default) */ GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE = 0, /** Measure similarity ignoring all whitespace */ |