aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-blame.adoc
diff options
context:
space:
mode:
authorAntonin Delpeuch <antonin@delpeuch.eu>2025-11-17 08:04:32 +0000
committerJunio C Hamano <gitster@pobox.com>2025-11-17 09:31:59 -0800
commitffffb987fcd3b3d6b88aceed87000ef4a5b6114e (patch)
tree62f688bdffc9d7749755cce9aa785705e2a7c838 /Documentation/git-blame.adoc
parent881793c4f71c84e70af256c5721475c7c088b3f7 (diff)
downloadgit-ffffb987fcd3b3d6b88aceed87000ef4a5b6114e.tar.xz
blame: make diff algorithm configurable
The diff algorithm used in 'git-blame(1)' is set to 'myers', without the possibility to change it aside from the `--minimal` option. There has been long-standing interest in changing the default diff algorithm to "histogram", and Git 3.0 was floated as a possible occasion for taking some steps towards that: https://lore.kernel.org/git/xmqqed873vgn.fsf@gitster.g/ As a preparation for this move, it is worth making sure that the diff algorithm is configurable where useful. Make it configurable in the `git-blame(1)` command by introducing the `--diff-algorithm` option and make honor the `diff.algorithm` config variable. Keep Myers diff as the default. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-blame.adoc')
-rw-r--r--Documentation/git-blame.adoc2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/git-blame.adoc b/Documentation/git-blame.adoc
index e438d28625..adcbb6f5dc 100644
--- a/Documentation/git-blame.adoc
+++ b/Documentation/git-blame.adoc
@@ -85,6 +85,8 @@ include::blame-options.adoc[]
Ignore whitespace when comparing the parent's version and
the child's to find where the lines came from.
+include::diff-algorithm-option.adoc[]
+
--abbrev=<n>::
Instead of using the default 7+1 hexadecimal digits as the
abbreviated object name, use <m>+1 digits, where <m> is at