git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jayesh DagaNext: Jayesh Daga
Message 10 of 14 in “t/pack-refs-tests: drop '-f' from test_path_is_missing”
  1. t/pack-refs-tests: drop '-f' from test_path_is_missingJayesh Daga via GitGitGadget, Mar 22, 2026
  2. K JayatheerthMar 22, 2026
  3. Tian YuchenMar 22, 2026
  4. jayesh0104Mar 24, 2026
  5. t/pack-refs-tests: drop '-f' from test_path_is_missingjayesh0104, Mar 24, 2026
  6. Eric SunshineMar 24, 2026
  7. t/pack-refs-tests: use test_path_is_missingjayesh0104, Mar 24, 2026
  8. Junio C HamanoMar 24, 2026
  9. t/pack-refs-tests: use test_path_is_missingJayesh Daga, Mar 24, 2026
  10. Tian YuchenMar 25, 2026
  11. tests: use test_path_is_missing instead of '! test -f'Jayesh Daga, Mar 25, 2026
  12. Junio C HamanoMar 25, 2026
  13. tests: use test_path_is_missing instead of '! test -f'Jayesh Daga, Apr 2, 2026
  14. tests: use test_path_is_missing instead of '! test -f'Jayesh Daga via GitGitGadget, Apr 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.