@matheusbsbs / matheus-bagliano / commits / 5fc6edab76
Fork 0

git-gui (Windows): Change wrapper to execdir 'libexec/git-core'

git-gui needs bindir in PATH to be able to run 'git'. bindir however is not necessarily in PATH if started directly through a Windows shortcut. Therefore, we used to add the directory git-gui is located in. But with the new 'libexec/git-core' layout this directory is no longer identical to bindir. This commit modifies the wrapper script to discover the bindir and add it to PATH. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Steffen Prohaska committed Jul 27, 2008 at 18:49 UTC 5fc6edab76ea16c5fad7138389c2fcc2076534e7
1 file changed +7 -4
windows/git-gui.sh
+7 -4
@@ -8,9 +8,12 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
8 incr argc -2
9 }
10
11 -set gitguidir [file dirname [info script]]
12 -regsub -all ";" $gitguidir "\\;" gitguidir
13 -set env(PATH) "$gitguidir;$env(PATH)"
14 -unset gitguidir
11 +set bindir [file dirname \
12 + [file dirname \
13 + [file dirname [info script]]]]
14 +set bindir [file join $bindir bin]
15 +regsub -all ";" $bindir "\\;" bindir
16 +set env(PATH) "$bindir;$env(PATH)"
17 +unset bindir
18
19 source [file join [file dirname [info script]] git-gui.tcl]