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 <gabriele.mzt@gmail.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Gabriele Mazzotta committed
Mar 23, 2019 at 18:00 UTC
9ea831a2a6845251b1f322a128d3d35e8b3774c9
1 file changed
+2
-2
gitk
+2
-2
@@ -8228,11 +8228,11 @@ proc parseblobdiffline {ids line} {
8228
} else {
8229
$ctext insert end "$line\n" filesep
8230
}
8231
- } elseif {![string compare -length 3 " >" $line]} {
8231
+ } elseif {$currdiffsubmod != "" && ![string compare -length 3 " >" $line]} {
8232
set $currdiffsubmod ""
8233
set line [encoding convertfrom $diffencoding $line]
8234
$ctext insert end "$line\n" dresult
8235
- } elseif {![string compare -length 3 " <" $line]} {
8235
+ } elseif {$currdiffsubmod != "" && ![string compare -length 3 " <" $line]} {
8236
set $currdiffsubmod ""
8237
set line [encoding convertfrom $diffencoding $line]
8238
$ctext insert end "$line\n" d0