From: Gabriele Mazzotta <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: Sat, 23 Mar 2019 18:00:36 +0100 [thread overview]
Message-ID: <20190323170036.21533-1-gabriele.mzt@gmail.com> (raw)
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.20.1
next reply other threads:[~2019-03-23 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-23 17:00 Gabriele Mazzotta [this message]
2019-09-15 23:08 ` [PATCH] gitk: Do not mistake unchanged lines with submodule changes Paul Mackerras
-- strict thread matches above, loose matches on Subject: below --
2018-10-21 16:34 Dummy Name
2018-10-21 16:39 ` Gabriele Mazzotta
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190323170036.21533-1-gabriele.mzt@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).