Re: [PATCH v4] t/pack-refs-tests: use test_path_is_missing
- From
Tian Yuchen <a3205153416@gmail.com>
- Date
- Mar 25, 2026, 17:19 UTC
- Message-ID
- <8dcc9e74-80a9-4963-aa9b-56f28e5edf45@gmail.com>
- In-Reply-To
- <20260324161329.71047-1-jayeshdaga99@gmail.com>
On 3/25/26 00:12, Jayesh Daga wrote:
Show 7 quoted lines
> Replace a raw '! test -f' check with test_path_is_missing > to use the standard test helper. > > This improves consistency with other tests and provides > better diagnostics on failure. > > Signed-off-by: Jayesh Daga <jayeshdaga99@gmail.com>
I think what Junio meant is that it would be better if you explain in more detail *why* such change is nice.
For example, under what specific circumstances might the original approach lead to bugs? How does the new approach address this issue? What exactly do the codes do?
To me, phrases like “improving consistency” and “provides better diagnostics” are essentially empty rhetoric unless they are backed up by the specific explanations. Even though this is just a simple one-line change, I think the principle still applies here — if a future developer (let say 50 years from now, human programmers will no longer be writing shell scripts by hand) sees this code, he/she likely won’t be able to quickly understand the intent and purpose of the change just from the commit message, right? :P
Regards, Yuchen