On Mon, Apr 7, 2008 at 9:30 AM,  <[EMAIL PROTECTED]> wrote:
>
>  On Apr 7, 9:41 pm, "Roman Terekhov" wrote:
>  > I like to write windows batch files with the git commands, that I want to
>  > execute together.
>  > But with the msysgit only the first command is executed while the the 
> others
>  > are skipped.
>  > Any ideas why this happen?
>
>  I don't really understand why this happens, but I have a work around.

Back in the days of DOS, the command interpreter could only run one
script at a time. When you run git (which the system finds as
"git.cmd") from inside a batch file, the contents of git.cmd replace
the currently executing script.

For compatibility reasons, when they added the ability to run multiple
scripts, they made you use "call". This braindamage persists in
Microsoft systems to this day.

>  Try prefixing the desired git command with the cmd.exe command "call".

This isn't a workaround so much as a documented "feature" of the
Windows command shell.

You don't have problems in cygwin because cygwin uses bash instead of
the default Windows command interpreter.

Peter Harris

Reply via email to