<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t8015-blame-diff-algorithm.sh, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-11-17T17:31:59Z</updated>
<entry>
<title>blame: make diff algorithm configurable</title>
<updated>2025-11-17T17:31:59Z</updated>
<author>
<name>Antonin Delpeuch</name>
<email>antonin@delpeuch.eu</email>
</author>
<published>2025-11-17T08:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffffb987fcd3b3d6b88aceed87000ef4a5b6114e'/>
<id>urn:sha1:ffffb987fcd3b3d6b88aceed87000ef4a5b6114e</id>
<content type='text'>
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 &lt;antonin@delpeuch.eu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
