On Mon, 2013-03-11 at 11:09 -0700, Junio C Hamano wrote:
> So strictly speaking there is no reason for an extra subshell here,
> but writing this in the way the patch does makes our intention
> crystal clear, I think.

If you're concerned about the extra processing of the new shell you can
use {} instead of ():

        {
            test -n "${CDPATH+set}" && unset CDPATH
            # NOTE: $2 is not quoted in order to support multiple options
            cd "$1" && git ls-files --exclude-standard $2
        } 2>/dev/null

Zsh does support this properly in my testing.  It's only redirection of
an entire function body, as the original, that is working differently in
zsh and bash.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to