Re: [PATCH v3] t7611: replace test -f with test_path_is* helpers
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 27, 2024, 16:15 UTC
- Message-ID
- <xmqqmsght848.fsf@gitster.g>
- In-Reply-To
- <D6MH7E17E6I0.3IG5103E7XXP3@gmail.com>
"Ghanshyam Thakkar" <shyamthakkar001@gmail.com> writes:
Show 16 quoted lines
> On Fri Dec 27, 2024 at 4:23 PM IST, Meet Soni wrote: >> Replace `test -f` and `test ! -f` with `test_path_is_file` and >> `test_path_is_missing` for better debuggability. >> >> While `test -f` ensures that the file exists and is a regular file, >> `test_path_is_file` provides clearer error messages on failure. On the >> other hand, `test ! -f`, used to check either the absence of a regular >> file or the presence of any other filesystem object, but looking at >> them in the test individually, all of them should've said `test ! e`, >> i.e. "there shouldn't be anything at given path on filesystem." >> Replaced these cases with `test_path_is_missing` for better >> debuggability. > > 'Replaced' -> 'Replace'. Cf. https://git-scm.com/docs/SubmittingPatches#imperative-mood > > Other than that, this LGTM.
Thanks, both. Tweaked the log message before applying. No need to resend.
Queued.