path: root/windows
diff options
authorSteffen Prohaska <>2007-10-10 06:58:59 (GMT)
committerShawn O. Pearce <>2007-10-10 07:50:01 (GMT)
commit99fe594d9677d55d773db3ab180310a3d3bf090b (patch)
tree05bc38891c42e4f255022baaef71c55a99e9e315 /windows
parenta16b74e72c1dfb6cdef2c17d564d9857ab386d7d (diff)
git-gui: add mingw specific startup wrapper
The wrapper adds the directory it is installed in to PATH. This is required for the git commands implemented in shell. git-gui fails to launch them if PATH is not modified. The wrapper script also accepts an optional command line switch '--working-dir <dir>' and changes to <dir> before launching the actual git-gui. This is required to implement the "Git Gui Here" Explorer shell extension. As a last step the original git-gui script is launched, which is expected to be located in the same directory under the name git-gui.tcl. Signed-off-by: Steffen Prohaska <> Signed-off-by: Shawn O. Pearce <>
Diffstat (limited to 'windows')
1 files changed, 16 insertions, 0 deletions
diff --git a/windows/ b/windows/
new file mode 100644
index 0000000..98f32c0
--- /dev/null
+++ b/windows/
@@ -0,0 +1,16 @@
+# Tcl ignores the next line -*- tcl -*- \
+exec wish "$0" -- "$@"
+if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
+ cd [lindex $argv 1]
+ set argv [lrange $argv 2 end]
+ incr argc -2
+set gitguidir [file dirname [info script]]
+regsub -all ";" $gitguidir "\\;" gitguidir
+set env(PATH) "$gitguidir;$env(PATH)"
+unset gitguidir
+source [file join [file dirname [info script]] git-gui.tcl]