Propagate error codes from the git executable.
commit4ab6228e1e39dc5501ae5240fea9c1be87e0b594
authorPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 10 Mar 2010 15:04:05 +0000 (10 15:04 +0000)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 10 Mar 2010 19:34:48 +0000 (10 19:34 +0000)
tree6ea60c3d3f5e20e2a1150c1ed1ee10516220a0aa
parentb4f80617cc43f014cb3a47afc992a36f9b457a9f
Propagate error codes from the git executable.

Any error code from running git was masked by the chcp call to restore the
codepage. This propagates the code from the git program by explicitly
setting the ERRORLEVEL environment variable. This then overrides the
ERRORLEVEL value that might be set by chcp and is eventually emitted by
the final command. ERRORLEVEL and %ERRORLEVEL% are not the same thing.
See http://blogs.msdn.com/oldnewthing/archive/2008/09/26/8965755.aspx

Also quote the COMSPEC to handle spaces in the expansion path and make it
possible to pass more than 8 args to git-gui.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
cmd/git.cmd