git-gui: Fix gitk search in $PATH to work on Windows
commit79317e5df184773f3211503be49b8836b712facc
authorShawn O. Pearce <spearce@spearce.org>
Wed, 30 Jul 2008 05:36:58 +0000 (29 22:36 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 30 Jul 2008 05:41:23 +0000 (29 22:41 -0700)
tree9c266b208e0fbb62aa1e7c50217c45c30bd4820c
parent25b8fb1e499d0e198e491d10c7023a5f5589e837
git-gui: Fix gitk search in $PATH to work on Windows

Back in 15430be5a1 ("Look for gitk in $PATH, not $LIBEXEC/git-core")
git-gui learned to use [_which gitk] to locate where gitk's script
is as Git 1.6 will install gitk to $prefix/bin (in $PATH) and all
of the other tools are in $gitexecdir.

This failed on Windows because _which adds the ".exe" suffix as it
searches for the program on $PATH, under the assumption that we can
only execute something from Tcl if it is a proper Windows executable.

When scanning for gitk on Windows we need to omit the ".exe" suffix.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh