Investigate "zebra" diff highlighting

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Work on this issue
  • Close this issue

Git 2.15 added support for so-called "zebra" highlighting in diffs. This detects lines that were moved (rather than changed) and highlights them differently.

https://git-scm.com/docs/git-diff:

zebra

Blocks of moved text of at least 20 alphanumeric characters are detected greedily. The detected blocks are painted using either the color.diff.{old,new}Moved color or color.diff.{old,new}MovedAlternative. The change between the two colors indicates that a new block was detected.

It'd be great if we could update our diff highlighting to account for this.

References:

  • https://twitter.com/SmileyKeith/status/946554839944724480
  • https://twitter.com/SmileyKeith/status/946789768506912773

image

Edited Sep 09, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading