Thread (13 messages) flat view 13 messages, 3 authors, 2016-06-15

Re: [PATCH] git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:06

Johannes Sixt [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index fd3875a..fa08d49 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -52,7 +52,11 @@ catch {rename send {}} ; # What an evil concept...
 set oguilib {@@GITGUI_LIBDIR@@}
 set oguirel {@@GITGUI_RELATIVE@@}
 if {$oguirel eq {1}} {
-	set oguilib [file dirname [file dirname [file normalize $argv0]]]
+	set oguilib [file dirname [file normalize $argv0]]
+	if {[lindex [file split $oguilib] end] eq {git-core}} {
+		set oguilib [file dirname $oguilib]
Isn't that what [file tail] does?

	if {[file tail $oguilib] eq {git-core}} {

But otherwise this looks good to me.  I'll apply it later tonight,
unless you agree that file tail is better here.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help