Skip to content

Commit 9ea831a

Browse files
gm-vmpaulusmack
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent d7cc4fb commit 9ea831a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8228,11 +8228,11 @@ proc parseblobdiffline {ids line} {
82288228
} else {
82298229
$ctext insert end "$line\n" filesep
82308230
}
8231-
} elseif {![string compare -length 3 " >" $line]} {
8231+
} elseif {$currdiffsubmod != "" && ![string compare -length 3 " >" $line]} {
82328232
set $currdiffsubmod ""
82338233
set line [encoding convertfrom $diffencoding $line]
82348234
$ctext insert end "$line\n" dresult
8235-
} elseif {![string compare -length 3 " <" $line]} {
8235+
} elseif {$currdiffsubmod != "" && ![string compare -length 3 " <" $line]} {
82368236
set $currdiffsubmod ""
82378237
set line [encoding convertfrom $diffencoding $line]
82388238
$ctext insert end "$line\n" d0

0 commit comments

Comments
 (0)