1 @rem
Do not use "echo off" to
not affect any child calls.
3 @rem Enable extensions
, the `
verify other
2>nul` is a trick from the
setlocal help
5 @
setlocal enableDelayedExpansion
7 @
echo Unable to enable delayed expansion. Immediate expansion will be used.
11 @rem Get the absolute
path to the parent directory
, which is assumed to be the
12 @rem Git installation root.
13 @
for /F
"delims=" %%I in
("%~dp0..") do @
set git_install_root
=%%~fI
14 @
set PATH=!git_install_root
!\bin
;!git_install_root
!\mingw
\bin
;!PATH!
16 @
if not exist "!HOME!" @
set HOME
=!HOMEDRIVE
!!HOMEPATH
!
17 @
if not exist "!HOME!" @
set HOME
=!USERPROFILE
!
19 @
start "gitk" wish.exe
"!git_install_root!\bin\gitk" -- %*
23 @rem The above script again with immediate expansion
, in case delayed expansion
25 @
for /F
"delims=" %%I in
("%~dp0..") do @
set git_install_root
=%%~fI
26 @
set PATH=%git_install_root%\bin
;%git_install_root%\mingw
\bin
;%PATH%
28 @
if not exist "%HOME%" @
set HOME
=%HOMEDRIVE%%HOMEPATH%
29 @
if not exist "%HOME%" @
set HOME
=%USERPROFILE%
31 @
start "gitk" wish.exe
"%git_install_root%\bin\gitk" -- %*