All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dummy Name <gabriele.mzt@gmail.com>
To: git@vger.kernel.org
Cc: paulus@ozlabs.org, Gabriele Mazzotta <gabriele.mzt@gmail.com>
Subject: [PATCH] gitk: Do not mistake unchanged lines with submodule changes
Date: Sun, 21 Oct 2018 18:34:01 +0200	[thread overview]
Message-ID: <20181021163401.4458-1-dummy@example.com> (raw)

From: Gabriele Mazzotta <gabriele.mzt@gmail.com>

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.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
---
 gitk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitk b/gitk
index a14d7a1..dd4bbbf 100755
--- a/gitk
+++ b/gitk
@@ -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
-- 
2.19.1


             reply	other threads:[~2018-10-21 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21 16:34 Dummy Name [this message]
2018-10-21 16:39 ` [PATCH] gitk: Do not mistake unchanged lines with submodule changes Gabriele Mazzotta
2019-03-23 17:00 Gabriele Mazzotta
2019-09-15 23:08 ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181021163401.4458-1-dummy@example.com \
    --to=gabriele.mzt@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=paulus@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.