Skip to content

Commit 9534c9f

Browse files
Johannes Sixtspearce
authored andcommitted
git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
The new execdir is two levels below the root directory, while the old execdir 'bin' was only one level below. This commit adapts the discovery of oguilib that uses relative paths accordingly. We determine whether we have the extra level in the same way in which the Makefile defines sharedir, i.e. whether the last directory part is 'git-core'. Inspired-by: Steffen Prohaska <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent fbbdaa5 commit 9534c9f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-gui.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ catch {rename send {}} ; # What an evil concept...
5252
set oguilib {@@GITGUI_LIBDIR@@}
5353
set oguirel {@@GITGUI_RELATIVE@@}
5454
if {$oguirel eq {1}} {
55-
set oguilib [file dirname [file dirname [file normalize $argv0]]]
55+
set oguilib [file dirname [file normalize $argv0]]
56+
if {[file tail $oguilib] eq {git-core}} {
57+
set oguilib [file dirname $oguilib]
58+
}
59+
set oguilib [file dirname $oguilib]
5660
set oguilib [file join $oguilib share git-gui lib]
5761
set oguimsg [file join $oguilib msgs]
5862
} elseif {[string match @@* $oguirel]} {

0 commit comments

Comments
 (0)