path: root/
diff options
authorShawn O. Pearce <>2007-09-21 01:25:34 (GMT)
committerShawn O. Pearce <>2007-09-21 03:16:53 (GMT)
commit2f7c9a7f310dae23989b4acd49514abc58334e5b (patch)
tree107d1feeb9c23bc4b72d0d8872b2a51635573a5a /
parentd4278b51e362e7a0f0e7922db47552f8c6726986 (diff)
git-gui: Support native Win32 Tcl/Tk under Cygwin
Cygwin has been stuck on the 8.4.1 version of Tcl/Tk for quite some time, even though the main Tcl/Tk distribution is already shipping an 8.4.15. The problem is Tcl/Tk no longer supports Cygwin so apparently building the package for Cygwin is now a non-trivial task. Its actually quite easy to build the native Win32 version of Tcl/Tk by compiling with the -mno-cygwin flag passed to GCC but this means we lose all of the "fancy" Cygwin path translations that the Tcl library was doing for us. This is particularly an issue when we are trying to start git-gui through the git wrapper as the git wrapper is passing off a Cygwin path for $0 and Tcl cannot find the startup script or the library directory. We now use `cygpath -m -a` to convert the UNIX style paths to Windows style paths in our startup script if we are building on Cygwin. Doing so allows either the Cygwin-ized Tcl/Tk 8.4.1 that comes with Cygwin or a manually built 8.4.15 that is running the pure Win32 implementation to read our script. Signed-off-by: Shawn O. Pearce <>
Diffstat (limited to '')
1 files changed, 3 insertions, 2 deletions
diff --git a/ b/
index db1507c..5a465e1 100755
--- a/
+++ b/
@@ -6,7 +6,8 @@
echo 'git-gui version @@GITGUI_VERSION@@'; \
exit; \
fi; \
- exec wish "$0" -- "$@"
+ argv0=$0; \
+ exec wish "$argv0" -- "$@"
set appvers {@@GITGUI_VERSION@@}
set copyright {
@@ -740,7 +741,7 @@ if {[catch {
exit 1
if {![file isdirectory $_gitdir] && [is_Cygwin]} {
- catch {set _gitdir [exec cygpath --unix $_gitdir]}
+ catch {set _gitdir [exec cygpath --windows $_gitdir]}
if {![file isdirectory $_gitdir]} {
catch {wm withdraw .}