This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Updated git wrapper exe

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information...
patthoyts committed Jun 27, 2012
1 parent 893b221 commit bcb6b06cca1cd7382055898649f4403c83743f7b
Showing with 0 additions and 36 deletions.
  1. +0 −36 cmd/git.cmd
  2. BIN cmd/git.exe
View
@@ -1,36 +0,0 @@
-@rem Do not use "echo off" to not affect any child calls.
-@setlocal
-
-@rem Get the abolute path to the parent directory, which is assumed to be the
-@rem Git installation root.
-@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
-@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
-
-@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
-@if not exist "%HOME%" @set HOME=%USERPROFILE%
-
-@set PLINK_PROTOCOL=ssh
-@if not defined TERM set TERM=msys
-
-@if "%1"=="gui" @goto gui
-
-:default
-@rem Get the current console ("OEM") codepage.
-@for /f %%i in ('getcp -oem') do @set cp_oem=%%i
-@rem Get the current GUI ("ANSI") codepage.
-@for /f %%i in ('getcp -ansi') do @set cp_ansi=%%i
-@rem Set the console codepage to match the GUI codepage.
-@chcp %cp_ansi% > nul < nul
-@git.exe %*
-@set ErrorLevel=%ErrorLevel%
-@rem Restore the original console codepage.
-@chcp %cp_oem% > nul < nul
-@goto quit
-
-:gui
-@if "%2"=="citool" @goto default
-@for /f "tokens=1-1*" %%a in ("%*") do @set args=%%b
-@start "git-gui" wish.exe "%git_install_root%\libexec\git-core\git-gui" -- %args%
-
-:quit
-@"%COMSPEC%" /c exit /b %ErrorLevel%
View
Binary file not shown.

2 comments on commit bcb6b06

@paulpv

This comment has been minimized.

Show comment Hide comment
@paulpv

paulpv Jan 18, 2013

Why was this git.cmd changed to git.exe?
Where is the source for this git.exe?

Why was this git.cmd changed to git.exe?
Where is the source for this git.exe?

@dscho

This comment has been minimized.

Show comment Hide comment
@dscho

dscho Jan 18, 2013

Owner

@paulpv It was changed because .cmd is not really version-portable. IOW we had too many problems with the .cmd that were easily resolved by switching to a wrapper written in C. The source can be found here: https://github.com/msysgit/msysgit/blob/master/src/git-wrapper/git-wrapper.c (FWIW I followed the history of /cmd/git.exe and then looked at the parent of the latest commit touching the .exe).

Owner

dscho replied Jan 18, 2013

@paulpv It was changed because .cmd is not really version-portable. IOW we had too many problems with the .cmd that were easily resolved by switching to a wrapper written in C. The source can be found here: https://github.com/msysgit/msysgit/blob/master/src/git-wrapper/git-wrapper.c (FWIW I followed the history of /cmd/git.exe and then looked at the parent of the latest commit touching the .exe).

Please sign in to comment.