Skip to content

Commit

Permalink
git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sprohaska authored and spearce committed Jul 30, 2008
1 parent f57ddcc commit 5fc6eda
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions windows/git-gui.sh
Expand Up @@ -8,9 +8,12 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
incr argc -2
}

set gitguidir [file dirname [info script]]
regsub -all ";" $gitguidir "\\;" gitguidir
set env(PATH) "$gitguidir;$env(PATH)"
unset gitguidir
set bindir [file dirname \
[file dirname \
[file dirname [info script]]]]
set bindir [file join $bindir bin]
regsub -all ";" $bindir "\\;" bindir
set env(PATH) "$bindir;$env(PATH)"
unset bindir
source [file join [file dirname [info script]] git-gui.tcl]

0 comments on commit 5fc6eda

Please sign in to comment.