{"thread":{"id":"18320","subject":"[PATCH] gitk: Handle blobs containing a DOS end-of-file marker.","startedAt":"2009-03-16T10:24:40Z","lastAt":"2009-03-23T10:33:23Z","messageCount":2,"participants":["Pat Thoyts","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"108073","messageId":"87y6v5ojdj.fsf@users.sourceforge.net","threadId":"18320","inReplyTo":null,"subject":"[PATCH] gitk: Handle blobs containing a DOS end-of-file marker.","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2009-03-16T10:24:40Z","receivedAt":"2009-03-16T10:24:40Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"\n  If a patchset contains an EOF marker (Ctrl-Z) the blob diff terminates\n  at that point. This patch permits gitk to ignore the eof and continue to\n  display any subsequent blobs and also displays a sensible representation\n  of the eof char.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n gitk |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 1773ae6..d7de27e 100755\n--- a/gitk\n+++ b/gitk\n@@ -7216,7 +7216,7 @@ proc getblobdiffs {ids} {\n     set diffnparents 0\n     set diffinhdr 0\n     set diffencoding [get_path_encoding {}]\n-    fconfigure $bdf -blocking 0 -encoding binary\n+    fconfigure $bdf -blocking 0 -encoding binary -eofchar {}\n     set blobdifffd($ids) $bdf\n     filerun $bdf [list getblobdiffline $bdf $diffids]\n }\n@@ -7367,7 +7367,8 @@ proc getblobdiffline {bdf ids} {\n \t    $ctext insert end \"$line\\n\" filesep\n \n \t} else {\n-\t    set line [encoding convertfrom $diffencoding $line]\n+\t    set line [string map {\\x1A ^Z} \\\n+                          [encoding convertfrom $diffencoding $line]]\n \t    # parse the prefix - one ' ', '-' or '+' for each parent\n \t    set prefix [string range $line 0 [expr {$diffnparents - 1}]]\n \t    set tag [expr {$diffnparents > 1? \"m\": \"d\"}]\n-- \n1.6.2.1217.gd7bc3\n"},{"id":"109036","messageId":"18887.25971.131679.375558@cargo.ozlabs.ibm.com","threadId":"18320","inReplyTo":"87y6v5ojdj.fsf@users.sourceforge.net","subject":"Re: [PATCH] gitk: Handle blobs containing a DOS end-of-file marker.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2009-03-23T10:33:23Z","receivedAt":"2009-03-23T10:33:23Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Pat Thoyts writes:\n\n>   If a patchset contains an EOF marker (Ctrl-Z) the blob diff terminates\n>   at that point. This patch permits gitk to ignore the eof and continue to\n>   display any subsequent blobs and also displays a sensible representation\n>   of the eof char.\n> \n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nThanks, applied.\n\nPaul.\n"}]}