From 9ea831a2a6845251b1f322a128d3d35e8b3774c9 Mon Sep 17 00:00:00 2001 From: Gabriele Mazzotta Date: Sat, 23 Mar 2019 18:00:36 +0100 Subject: gitk: Do not mistake unchanged lines for submodule changes Unchanged lines are prefixed with a white-space, thus unchanged lines starting with either " <" or " >" are mistaken for submodule changes. Check if a line starts with either " <" or " >" only if we are listing the changes of a submodule. Signed-off-by: Gabriele Mazzotta Signed-off-by: Paul Mackerras diff --git a/gitk b/gitk index 5c6db3d..abe4805 100755 --- a/gitk +++ b/gitk @@ -8228,11 +8228,11 @@ proc parseblobdiffline {ids line} { } else { $ctext insert end "$line\n" filesep } - } elseif {![string compare -length 3 " >" $line]} { + } elseif {$currdiffsubmod != "" && ![string compare -length 3 " >" $line]} { set $currdiffsubmod "" set line [encoding convertfrom $diffencoding $line] $ctext insert end "$line\n" dresult - } elseif {![string compare -length 3 " <" $line]} { + } elseif {$currdiffsubmod != "" && ![string compare -length 3 " <" $line]} { set $currdiffsubmod "" set line [encoding convertfrom $diffencoding $line] $ctext insert end "$line\n" d0 -- cgit v0.10.2-6-g49f6