[PATCH] SoC 2024: clarify `test_path_is_*` conversion microproject
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 4, 2024, 09:16 UTC
- Message-ID
- <84995a068640c72c8f17406ffa0441c7fdba4bdc.1709543804.git.ps@pks.im>
- In-Reply-To
- <xmqqzfvjf5tq.fsf@gitster.g>
One of our proposed microprojects is to convert instances of `test -e` and related functions to instead use `test_path_exists` or similar. This conversion is only feasible when `test -e` is not used as part of a control statement, as the replacement is used to _assert_ a condition instead of merely testing for it.
Clarify the microproject's description accordingly.
Signed-off-by: Patrick Steinhardt <ps@pks.im> --- SoC-2024-Microprojects.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/SoC-2024-Microprojects.md b/SoC-2024-Microprojects.md index 644c0a6..782441f 100644 --- a/SoC-2024-Microprojects.md +++ b/SoC-2024-Microprojects.md @@ -41,7 +41,10 @@ to search, so that we can remove this microproject idea. Find one test script that verifies the presence/absence of files/directories with 'test -(e|f|d|...)' and replace them with the appropriate `test_path_is_file`, `test_path_is_dir`, etc. helper -functions. +functions. Note that this conversion does not directly apply to control +flow constructs like `if test -e ./path; then ...; fi` because the +replacements are intended to assert the condition instead of merely +testing for it. If you can't find one please tell us, along with the command you used to search, so that we can remove this microproject idea.
-- 2.44.0