Fix the window icon and title for "Git Bash" when launched via shell extension
[msysgit/kirr.git] / cmd / git.cmd
blob95ceda6e78442de862dc5f4d7d1ac9975c135e95
1 @rem Do not use "echo off" to not affect any child calls.
2 @setlocal
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
14 :default
15 @git.exe %*
16 @goto quit
18 :gui
19 @if "%2"=="citool" @goto default
20 @start wish.exe "%git_install_root%\libexec\git-core\git-gui" -- %2 %3 %4 %5 %6 %7 %8 %9
22 :quit
23 @%COMSPEC% /c exit /b %ErrorLevel%