alias: use run_command api to execute aliases
commit7f51f8bc2b9d0556f2fbe20056e8fc8839766c99
authorErik Faye-Lund <kusmabite@gmail.com>
Thu, 6 Jan 2011 23:00:38 +0000 (7 00:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Jan 2011 00:29:49 +0000 (6 16:29 -0800)
treec49b5f357594231bd3d23da458705a34acd09d50
parent685e9d9145a186a4b2036ecf2be73cc86d99a9b7
alias: use run_command api to execute aliases

On Windows, system() executes with cmd.exe instead of /bin/sh. This
means that aliases currently has to be batch-scripts instead of
bourne-scripts. On top of that, cmd.exe does not handle single quotes,
which is what the code-path currently uses to handle arguments with
spaces.

To solve both problems in one go, use run_command_v_opt() to execute
the alias. It already does the right thing prepend "sh -c " to the
alias.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c