Re: [GSOC][PATCH v3 1/1] t7301: use test_path_is_(missing|file)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 4, 2024, 21:50 UTC
- Message-ID
- <xmqqcys9oedq.fsf@gitster.g>
- In-Reply-To
- <20240304171732.64457-2-vincenzo.mezzela@gmail.com>
Vincenzo Mezzela <vincenzo.mezzela@gmail.com> writes:
> Refactor test -f to utilize the corresponding helper functions from
As Eric pointed out to another GSoC applicant in a different thread, this is not refactoring any code, so saying "refactor" is a bit misleading.
Replace use of "test -f" with the "test_path_is_file" helper
function ...Show 6 quoted lines
> test-lib-functions.sh. These functions perform identical operations > while enhancing debugging capabilities in case of test failures. > > In the context of this file, 'test ! -f' is meant to check if the file > has been correctly cleaned, thus its usage is replaced with > 'test_path_is_missing' instead of '! test_path_is_file'.
In other words, the original used "test ! -f" when it meant to say "test ! -e", and test_path_is_missing would be a correct replacement?
If so that makes sense.