Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository

From: Junio C Hamano <[email-masked]>
Date: Fri, 29 Aug 2025 09:31:13 -0700

Phillip Wood <[email-masked]> writes:

>> That should only happen if you set GIT_TEST_INSTALLED or something,
>> right? Or maybe some even more exotic setup: even with my
>> distro-installed Git, the command doesn't list my git-* scripts in
>> $PATH or installed extensions (like git-when-merged).
>
> Sorry for the confusion, I've just had another look and it turns out I
> had some rubbish laying around in the root of my repository which was
> causing the problem.

I do not think this is something you should feel sorry about.

If you checked out and built 'seen' that invents new commands,
and then checked out 'next' that lacks these new commands without
first running "make clean" (relying on the mtime of the source will
cause rebuilding of necessary things), your build on 'next' will 
see "some rubbish laying around" that may cause the same issue, no?

As "test" is primarily to help developers, I think we should find a
way for this test not to be confused by "some rubbish laying around"
if possible.

Thanks.