Tim Schumacher <[email protected]> writes:
> On 08.09.18 15:28, Duy Nguyen wrote:
>> On Sat, Sep 8, 2018 at 12:44 AM Tim Schumacher <[email protected]> wrote:
>>> + /*
>>> + * It could be an alias -- this works around the insanity
>>> * of overriding "git log" with "git show" by having
>>> * alias.log = show
>>> */
>>
>> I think this comment block is about the next two lines you just
>> deleted. So delete it to instead of fixing style.
>
> I think that comment is talking about the code that is handing the alias,
> so it still would be valid.
"this" in "this works around" refers to the fact that we first check
the builtins and on-GIT_EXEC_PATH commands before trying an alias,
which is an effective way to forbid an alias from taking over
existing command names. So it is not about a particular code but is
about how the two sections of code are laid out.
It probably will make it clear if we reworded and made it a comment
about the whole while() loop may make sense, i.e.
/*
* Check if av[0] is a command before seeing if it is an
* alias to avoid the insanity of overriding ...
*/
while (1) {
...
but that can be done after the dust settles as a clean-up, I would
think.