Fix problems with the exit code
If you call git.cmd from a batch file, then you receive the exit code and can
check it. However, if you call git.cmd from a perl/ruby script, the exit code
will always be zero.
This is happening because cmd.exe has an obscure bug and exit /b does not set
the exit code if git.cmd was not called from a batch file (i.e. cmd /c git from
a perl/ruby script). exit %ErrorLevel% would work, but it would make it
impossible to easily call git from batch files. So the solution is to run
cmd.exe /c exit /b %ErrorLevel% as a last line in the batch file. This must be
setting something internal to cmd.exe and causes it to work in all situations.
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>