| # Tcl ignores the next line -*- tcl -*- \ |
| if { $argc >=2 && [lindex $argv 0] == "--working-dir" } { |
| set workdir [lindex $argv 1] |
| if {[lindex [file split $workdir] end] eq {.git}} { |
| # Workaround for Explorer right click "Git GUI Here" on .git/ |
| set argv [lrange $argv 2 end] |
| set basedir [file dirname \ |
| [file dirname [info script]]]] |
| set bindir [file join $basedir bin] |
| set bindir "$bindir;[file join $basedir mingw bin]" |
| regsub -all ";" $bindir "\\;" bindir |
| set env(PATH) "$bindir;$env(PATH)" |
| source [file join [file dirname [info script]] git-gui.tcl] |