Jeff King <p...@peff.net> writes:

> On Thu, Jan 02, 2014 at 11:41:05AM -0800, Junio C Hamano wrote:
>
>>  - builtin/merge.c is the same, but it is conceptually even worse.
>>    It has the end-user supplied string and wants to see if it is a
>>    valid strategy.  If the user wants to use a custom strategy, a
>>    single stat() to make sure if it exists should suffice, and the
>>    error codepath should load the command list to present the names
>>    of available ones in the error message.
>
> Is it a single stat()? I think we would need to check each element of
> $PATH. 

Yeah, load_command_list() iterates over the members of env_path.

> Though in practice, the exec-dir would be the first thing we
> check, and where we would find the majority of hits. So it would still
> be a win, as we would avoid touching anything but the exec-dir in the
> common case.

Exactly.
--
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