On Mon, Sep 19, 2011 at 11:46:37PM +0200, Andreas Schwab wrote:
Junio C Hamano [off-list ref] writes:
quoted
Thinking about it a bit more, I suspect that we should just let the 'eval'
grab value out of the $browser_cmd variable, i.e.
eval '$browser_cmd "$@"'
no?
That's a Useless Use of Eval and 100% equivalent to this:
$browser_cmd "$@"
Yeah. Doing:
eval '$browser_cmd'
will do the whitespace-breaking we want, but it won't interpret actual
shell magic characters, which we need in order to be compatible with
other parts of git (which typically use "sh -c ..."). E.g.:
foo=worked
browser_cmd='echo $foo'
# fail
$browser_cmd
# fail
eval '$browser_cmd'
# works
eval "$browser_cmd"
-Peff