git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Display "gitweb/test/file with spaces" in gitk

From
TKThomas Kolejka <thomas.kolejka@gmx.at>
Date
Jul 20, 2006, 10:12 UTC
Message-ID
<20060720101223.116320@gmx.net>
Hello,

with this patch files with spaces in their names are displayed in the treeview of gitk.

I use git to make a "backup"/"dump" of a DOS-FS .. and there are those filenames ;-).

Take care .. it's my first tcl hack!
Thomas
--
diff --git a/gitk b/gitk
index ba4644f..93af19c 100755
--- a/gitk
+++ b/gitk
@@ -3938,7 +3938,7 @@ proc gettreeline {gtf id} {
     while {[gets $gtf line] >= 0} {
        if {[lindex $line 1] ne "blob"} continue
        set sha1 [lindex $line 2]
-       set fname [lindex $line 3]
+       set fname [join [lrange $line 3 end]]
        lappend treefilelist($id) $fname
        lappend treeidlist($id) $sha1
     }
@@ -4147,7 +4147,7 @@ proc gettreediffline {gdtf ids} {
        }
        return
     }
-    set file [lindex $line 5]
+    set file [join [lrange $line 5 end]]
     lappend treediff $file
 }
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Next: Paul Mackerras
Message 1 of 2 in “Display "gitweb/test/file with spaces" in gitk”
  1. Display "gitweb/test/file with spaces" in gitkThomas Kolejka, Jul 20, 2006
  2. Paul MackerrasJul 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.