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

[PATCH] git-gui: fix browsers [Up To Parent] in sub-sub-directories.

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Nov 19, 2010, 20:43 UTC
Message-ID
<1290199429-30421-1-git-send-email-bert.wesarg@googlemail.com>

browser_path used to end with a slash, so the regexp matches the empty string and therefore removes nothing.

Fix this.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 git-gui/lib/browser.tcl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl
index c241572..a8c6223 100644
--- a/git-gui/lib/browser.tcl
+++ b/git-gui/lib/browser.tcl
@@ -121,7 +121,7 @@ method _parent {} {
 		if {$browser_stack eq {}} {
 			regsub {:.*$} $browser_path {:} browser_path
 		} else {
-			regsub {/[^/]+$} $browser_path {} browser_path
+			regsub {/[^/]+/$} $browser_path {/} browser_path
 		}
 		set browser_status [mc "Loading %s..." $browser_path]
 		_ls $this [lindex $parent 0] [lindex $parent 1]
-- 
tg: (6f10c41..) bw/git-gui/fix-browser-up (depends on: master)
Next: Pat Thoyts
Message 1 of 2 in “git-gui: fix browsers [Up To Parent] in sub-sub-directories.”
  1. git-gui: fix browsers [Up To Parent] in sub-sub-directories.Bert Wesarg, Nov 19, 2010
  2. Pat ThoytsNov 22, 2010

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.