gitk: Do not mistake unchanged lines for submodule changes
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index 5c6db3d6c470797da4dbff2cc2555ab3087b85bb..abe4805adedb3c3559bf0048ae49df2e2ac37337 100755 (executable)
--- 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