1 @rem
Do not use "echo off" to
not affect any child calls.
4 @rem Get the abolute
path to the parent directory
, which is assumed to be the
5 @rem Git installation root.
6 @
for /F
"delims=" %%I in
("%~dp0..") do @
set git_install_root
=%%~fI
7 @
set PATH=%git_install_root%\bin
;%git_install_root%\mingw
\bin
;%PATH%
9 @
if "%HOME%"=="" @
set HOME
=%USERPROFILE%
10 @
set PLINK_PROTOCOL
=ssh
12 @
if "%1"=="gui" @
goto gui
15 @rem Get the current console
("OEM") codepage.
16 @
for /f
"tokens=4" %%i in
('chcp') do @
set cp_oem
=%%i
17 @rem Get the current GUI
("ANSI") codepage.
18 @
for /f
"skip=2 tokens=3" %%i in
('reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage /v ACP') do @
set cp_ansi
=%%i
19 @rem
Set the console
codepage to match the GUI
codepage.
22 @rem
Restore the original console
codepage.
27 @
if "%2"=="citool" @
goto default
28 @
start wish.exe
"%git_install_root%\libexec\git-core\git-gui" -- %2 %3 %4 %5 %6 %7 %8 %9
31 @
%COMSPEC% /c
exit /b
%ErrorLevel%