difftool: Use eval to expand '--extcmd' expressions

It was not possible to pass quoted commands to '--extcmd'.
By using 'eval' we ensure that expressions with spaces and
quotes are supported.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
David Aguilar
2010-01-15 14:03:44 -08:00
committed by Junio C Hamano
parent f47f1e2ce8
commit 9f3d54d193
2 changed files with 14 additions and 2 deletions

View File

@ -48,11 +48,10 @@ launch_merge_tool () {
fi
if use_ext_cmd; then
$GIT_DIFFTOOL_EXTCMD "$LOCAL" "$REMOTE"
eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
else
run_merge_tool "$merge_tool"
fi
}
if ! use_ext_cmd; then