git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Jolliton" <gmane@frederic.jolliton.com>
To: git@vger.kernel.org
Subject: [PATCH] gitk doesn't handle filenames with space correctly
Date: Sat, 07 Apr 2007 03:22:59 +0200	[thread overview]
Message-ID: <86slbd6kr0.fsf@mau.intra.tuxee.net> (raw)

Hi,

Here is an attempt to fix gitk such that it can display filenames with
space correctly, in the right column (Patch/Tree). I don't know TCL, so
probably that a better solution exists.

--- gitk.orig	2007-04-07 02:36:05.000000000 +0200
+++ gitk	2007-04-07 03:13:16.000000000 +0200
@@ -4114,8 +4114,7 @@
 
     while {[gets $gtf line] >= 0} {
 	if {[lindex $line 1] ne "blob"} continue
-	set sha1 [lindex $line 2]
-	set fname [lindex $line 3]
+	regexp {^[^ ]+ [^ ]+ ([^ ]+)\t(.*)} $line -> sha1 fname
 	lappend treefilelist($id) $fname
 	lappend treeidlist($id) $sha1
     }
@@ -4324,7 +4323,7 @@
 	}
 	return
     }
-    set file [lindex $line 5]
+    regexp {^[^ ]+ [^ ]+ [^ ]+ [^ ]+ [^ ]+\t(.*)} $line -> file
     lappend treediff $file
 }

-- 
Frédéric Jolliton

             reply	other threads:[~2007-04-07  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-07  1:22 Frédéric Jolliton [this message]
2007-04-12  0:00 ` [PATCH] gitk doesn't handle filenames with space correctly Bernt Hansen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86slbd6kr0.fsf@mau.intra.tuxee.net \
    --to=gmane@frederic.jolliton.com \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).