{"thread":{"id":"4926","subject":"[PATCH] Display \"gitweb/test/file with spaces\" in gitk","startedAt":"2006-07-20T10:12:23Z","lastAt":"2006-07-21T13:01:56Z","messageCount":2,"participants":["Thomas Kolejka","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23952","messageId":"20060720101223.116320@gmx.net","threadId":"4926","inReplyTo":null,"subject":"[PATCH] Display \"gitweb/test/file with spaces\" in gitk","fromName":"Thomas Kolejka","fromEmail":"thomas.kolejka@gmx.at","sentAt":"2006-07-20T10:12:23Z","receivedAt":"2006-07-20T10:12:23Z","isPatch":true,"sender":{"key":"thomas.kolejka@gmx.at","avatar":null},"body":"Hello,\n\nwith this patch files with spaces in their names are displayed\nin the treeview of gitk.\n\nI use git to make a \"backup\"/\"dump\" of a DOS-FS .. and there are \nthose filenames ;-).\n\nTake care .. it's my first tcl hack!\n\nThomas\n\n--\ndiff --git a/gitk b/gitk\nindex ba4644f..93af19c 100755\n--- a/gitk\n+++ b/gitk\n@@ -3938,7 +3938,7 @@ proc gettreeline {gtf id} {\n     while {[gets $gtf line] >= 0} {\n        if {[lindex $line 1] ne \"blob\"} continue\n        set sha1 [lindex $line 2]\n-       set fname [lindex $line 3]\n+       set fname [join [lrange $line 3 end]]\n        lappend treefilelist($id) $fname\n        lappend treeidlist($id) $sha1\n     }\n@@ -4147,7 +4147,7 @@ proc gettreediffline {gdtf ids} {\n        }\n        return\n     }\n-    set file [lindex $line 5]\n+    set file [join [lrange $line 5 end]]\n     lappend treediff $file\n }\n\n\n\n-- \n\n\nDer GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!\nIdeal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer\n"},{"id":"23972","messageId":"17600.53316.193618.755468@cargo.ozlabs.ibm.com","threadId":"4926","inReplyTo":"20060720101223.116320@gmx.net","subject":"Re: [PATCH] Display \"gitweb/test/file with spaces\" in gitk","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2006-07-21T13:01:56Z","receivedAt":"2006-07-21T13:01:56Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Thomas Kolejka writes:\n\n> with this patch files with spaces in their names are displayed\n> in the treeview of gitk.\n> \n> I use git to make a \"backup\"/\"dump\" of a DOS-FS .. and there are \n> those filenames ;-).\n\nHmmm, certainly my code is incorrect.  However with your code, tabs in\nthe filename will get changed to spaces.  Treating the line read from\ngit-ls-tree or git-diff-tree was a shortcut hack that isn't really\noptimal.  I'll think about the best way to fix it.\n\nPaul.\n"}]}