From 2e073d9e8bb00926a71fdb74403bafd4f89f2341 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 17 Jun 2019 14:43:45 -0400 Subject: [PATCH] blame: read diff config When users use custom diff settings in their Git config, they expect all diff algorithms to use those values. In particular, some diffs change greatly if the "patience" algorithm is used instead of the default. In cases where the diff config changes the diff output, the output of 'git blame' can also change. This alters the user's expectations, as they look at the diff for that commit and cannot understand how the line was changed by that commit. Read the diff config options in 'git blame' so the diff algorithm uses these options. Signed-off-by: Derrick Stolee --- builtin/blame.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/blame.c b/builtin/blame.c index 21cde57e711e33..8e630821ba8acd 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -725,6 +725,8 @@ static int git_blame_config(const char *var, const char *value, void *cb) return -1; if (userdiff_config(var, value) < 0) return -1; + if (git_diff_ui_config(var, value, cb)) + return -1; return git_default_config(var, value, cb); }