Matthieu Moy <matthieu....@grenoble-inp.fr> writes:
> Junio C Hamano <gits...@pobox.com> writes:
>> Ahh, thanks for reminding me of this. You are right; these two
>> functions are broken when the user has CDPATH set, I think.
>> Here is a reroll.
> Thanks. Even nicer that the previous since the CDPATH implied the
> subshell anyway.
Actually, "cd", not CDPATH, is what implies that the caller must be
calling us in a subshell, e.g.
result=$(__git_ls_files_helper dir/ args...)
Otherwise the user's shell would have been taken to an unexpected
place, with or without CDPATH.
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.
In any case, let's queue this fix for the 1.8.2 final. The CDPATH
thing will affect not just zsh but bash users.
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