git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-gui: fix browser with initial path
@ 2010-11-23  7:37 Bert Wesarg
  2010-12-10  8:48 ` Bert Wesarg
  0 siblings, 1 reply; 4+ messages in thread
From: Bert Wesarg @ 2010-11-23  7:37 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: Bert Wesarg, Shawn O. Pearce, git

The path given to the browser does not end in a slash, which results in bad
path given to blame and broke [Up To Parent]. Also the path was not
escaped before displaying.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

---
 git-gui/lib/browser.tcl |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl
index c241572..a88a68b 100644
--- a/git-gui/lib/browser.tcl
+++ b/git-gui/lib/browser.tcl
@@ -26,8 +26,14 @@ constructor new {commit {path {}}} {
 	wm withdraw $top
 	wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]]
 
+	if {$path ne {}} {
+		if {[string index $path end] ne {/}} {
+			append path /
+		}
+	}
+
 	set browser_commit $commit
-	set browser_path $browser_commit:$path
+	set browser_path "$browser_commit:[escape_path $path]"
 
 	${NS}::label $w.path \
 		-textvariable @browser_path \
-- 
tg: (6f10c41..) bw/git-gui/fix-browser-up (depends on: master)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-28 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23  7:37 [PATCH] git-gui: fix browser with initial path Bert Wesarg
2010-12-10  8:48 ` Bert Wesarg
2011-01-28 10:42   ` Pat Thoyts
2011-01-28 11:04     ` Bert Wesarg

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).