summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2017-11-03 13:50:51 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2017-11-03 13:50:51 +0100
commita19a1181a7099b52d373a9b2346add488d481d6e (patch)
tree704aaec6abc213d8c24ce6d23122ee14b3b14fa6
parent7de843f49a79cc396f86147c80d542b1c3fd4608 (diff)
downloadlibgit2-cmn/expose-indent-heuristic.tar.gz
blame: disable the indent heuristiccmn/expose-indent-heuristic
This breaks some assumptions we have in the tests.
-rw-r--r--src/blame.c1
-rw-r--r--src/blame_git.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/blame.c b/src/blame.c
index a923bf003..d9b7d7a62 100644
--- a/src/blame.c
+++ b/src/blame.c
@@ -501,6 +501,7 @@ int git_blame_buffer(
}
/* Diff to the reference blob */
+ diffopts.flags |= GIT_DIFF_DISABLE_INDENT_HEURISTIC;
git_diff_blob_to_buffer(reference->final_blob, blame->path,
buffer, buffer_len, blame->path, &diffopts,
NULL, NULL, buffer_hunk_cb, buffer_line_cb, blame);
diff --git a/src/blame_git.c b/src/blame_git.c
index 3c221b318..997c3a242 100644
--- a/src/blame_git.c
+++ b/src/blame_git.c
@@ -429,7 +429,7 @@ static git_blame__origin* find_origin(
/* Configure the diff */
diffopts.context_lines = 0;
- diffopts.flags = GIT_DIFF_SKIP_BINARY_CHECK;
+ diffopts.flags = GIT_DIFF_SKIP_BINARY_CHECK | GIT_DIFF_DISABLE_INDENT_HEURISTIC;
/* Check to see if files we're interested have changed */
diffopts.pathspec.count = blame->paths.length;