{"thread":{"id":"3593","subject":"gitk : Lines not showing up in diff","startedAt":"2006-03-07T19:43:30Z","lastAt":"2006-03-07T22:17:09Z","messageCount":3,"participants":["Jacob Kroon","Robert Fitzsimons","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"17307","messageId":"440DE262.7020007@gmail.com","threadId":"3593","inReplyTo":null,"subject":"gitk : Lines not showing up in diff","fromName":"Jacob Kroon","fromEmail":"jacob.kroon@gmail.com","sentAt":"2006-03-07T19:43:30Z","receivedAt":"2006-03-07T19:43:30Z","isPatch":false,"sender":{"key":"jacob.kroon@gmail.com","avatar":null},"body":"I \"think\" this is a bug in gitk:\n\nIf I have a textfile in which I remove or add a line that looks like \n\"-----------...\", it won't show up in the diff gitk produces. \"cg-log\" \nshows the line correctly being added or deleted.\n\nI'm using gitk 1.2.4 (From Fedora, gitk-1.2.4-1.fc4)\n\n//Jacob\n"},{"id":"17311","messageId":"20060307204648.GA13620@localhost","threadId":"3593","inReplyTo":"440DE262.7020007@gmail.com","subject":"[PATCH] gitk : fix missing lines when displaying diff.","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-03-07T20:46:48Z","receivedAt":"2006-03-07T20:46:48Z","isPatch":true,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"Lines which are added (removed) and begin with +++ (---) are not shown\ncorrectly when displaying in the diff panel.\n\nThe +++ and --- lines are part of the diff header, with the +++\nindicating the end of the header.\n\nSigned-off-by: Robert Fitzsimons <robfitz@273k.net>\n\n\n---\n\n gitk |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\nd0da9f04cf565df64a954e1bfd4c5c0913b83322\ndiff --git a/gitk b/gitk\nindex f4c6624..5e3c34c 100755\n--- a/gitk\n+++ b/gitk\n@@ -2595,8 +2595,10 @@ proc getblobdiffline {bdf ids} {\n        set pad [string range \"----------------------------------------\" 1 $l]\n        $ctext insert end \"$pad $header $pad\\n\" filesep\n        set diffinhdr 1\n-    } elseif {[regexp {^(---|\\+\\+\\+)} $line]} {\n-       set diffinhdr 0\n+    } elseif {$diffinhdr == 1 && [regexp {^(---|\\+\\+\\+) } $line]} {\n+       if {[regexp {^\\+\\+\\+ } $line]} {\n+           set diffinhdr 0\n+       }\n     } elseif {[regexp {^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@(.*)} \\\n                   $line match f1l f1c f2l f2c rest]} {\n        $ctext insert end \"$line\\n\" hunksep\n--\n1.2.3.g20d2\n"},{"id":"17312","messageId":"17422.1637.975579.478563@cargo.ozlabs.ibm.com","threadId":"3593","inReplyTo":"20060307204648.GA13620@localhost","subject":"Re: [PATCH] gitk : fix missing lines when displaying diff.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2006-03-07T22:17:09Z","receivedAt":"2006-03-07T22:17:09Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Robert Fitzsimons writes:\n\n> Lines which are added (removed) and begin with +++ (---) are not shown\n> correctly when displaying in the diff panel.\n> \n> The +++ and --- lines are part of the diff header, with the +++\n> indicating the end of the header.\n\nThanks for pointing out the easy fix.  I had been going to do\nsomething much more complicated. :)\n\nHowever, your patch didn't apply due to the whitespace being munged.\nI committed an equivalent fix, but I took the opportunity to change\nthe [regexp] to a couple of [string compare]s as well.\n\nPaul.\n"}]}