user1589188 user1589188 - 10 months ago 55
Git Question

gitlab highlighting whole line instead of just the characters changed in a long string

Not sure if this is in general the git thing or gitlab, but I don't like it highlighted a rather long sub-section of a long continuous string in deeper colour including parts that were not changed when only some characters are changed in the string.

Is there a way to configure gitlab not to do this? i.e. just highlights those characters updated only


This feature was introduced in Gitlab 8.10 (see section "Inline Diffs").

git itself uses line-based diffs, so it will internally always store the complete changed lines. However, git tools also allow to visually highlight only those changed parts, e.g. with git diff --word-diff=color.