Skip to contentSkip to conversation

gitk: Do not mistake unchanged lines with submodule changes

PATCH In review Dummy Name 1 participant 2 messages Oct 21, 2018

lore
Share & tools
lore

Dummy Name

author
#0 lore raw

PATCH 1/1 gitk: Do not mistake unchanged lines with submodule changes

From: Gabriele Mazzotta <[email protected]>

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 listing the changes of a submodule.

---
 gitk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
gitk +2 -2
index a14d7a1..dd4bbbf 100755
@@ -8191,11 +8191,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
Signature · 1 line
2.19.1
#1 lore raw
Quoted 8 lines · Dummy Name

From: Gabriele Mazzotta <[email protected]>

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 listing the changes of a submodule.

Hi,

I accidentally pressed Enter before I could set the committer to the correct value. I can resend the patch if necessary.

Regards,
Gabriele