From: Junio C Hamano Date: Thu, 29 Mar 2012 04:02:14 GMT Subject: Re: [PATCH] Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd Message-ID: <7v8vikrr5l.fsf@alter.siamese.dyndns.org> In-Reply-To: <1332977191-29069-1-git-send-email-bwalton@artsci.utoronto.ca> Ben Walton writes: > Possible fixes for this issue are: > ... > 2. The git wrapper could prepend SANE_TOOL_PATH to PATH for > consistency with builtin commands. > > 3. The run_command.c:prepare_shell_command() could use the same > SHELL_PATH that is in the #! line of all all scripts. > ... > Option 2 is voided by the same example that turned up this issue. > SANE_TOOL_PATH might also include 'insane' tools. > > Option 3 is the best choice at this time. This line of reasoning makes me feel uneasy. The approach may allow a directory that has "insane" tools in it to be on the SANE_TOOL_PATH for *this* particular codepath, but at the same time, it encourages people to build Git with such a broken SANE_TOOL_PATH. Aren't you exposing your users to potential breakage in other parts of the system, caused by broken tools on SANE_TOOL_PATH that is not shell, by doing so? Worse yet, there is no escape hatch similar to SHELL_PATH for such tools. Will queue on 'pu' for now, but I am not convinced.