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

[PATCH v3 0/2] t5403: improve post-checkout hook testing

From
Deveshi Dwivedi <deveshigurgaon@gmail.com>
Date
Jan 12, 2026, 16:36 UTC
Message-ID
<20260112163643.231-1-deveshigurgaon@gmail.com>
In-Reply-To
<20260111072950.9463-1-deveshigurgaon@gmail.com>

Following up on the recently merged patch that replaced 'test -f' with test_path_is_file, this series continues the cleanup of the post-checkout hook tests.

Patch 1/2 introduces a check_post_checkout helper function to replace the repeated pattern of reading and validating hook arguments. This refactoring does not change test behavior, but makes the code easier to maintain and prepares it for further improvement.

Patch 2/2 updates the helper and hook output format to use test_cmp instead of individual test commands. This provides clearer error messages on failure, making it easier to see which argument (old ref, new ref, or flag) did not match the expectation

Changes since v2:
- Update commit message of patch 1/2 to note that the clone test now
validates post-checkout hook arguments, not just hook execution.
Deveshi Dwivedi (2):
  t5403:introduce check_post_checkout helper function
  t5403: use test_cmp for post-checkout argument checks
 t/t5403-post-checkout-hook.sh | 53 ++++++++++++++++++++---------------
 1 file changed, 30 insertions(+), 23 deletions(-)
-- 
2.52.0.230.gd8af7cadaa
Previous: Deveshi DwivediNext: Deveshi Dwivedi
Message 12 of 14 in “t5403: improve post-checkout hook testing”
  1. 0/2 t5403: improve post-checkout hook testingDeveshi Dwivedi, Jan 11, 2026
  2. 1/2 t5403:introduce check_post_checkout helper functionDeveshi Dwivedi, Jan 11, 2026
  3. Eric SunshineJan 11, 2026
  4. Pushkar SinghJan 11, 2026
  5. Deveshi DwivediJan 12, 2026
  6. t5403: document check_post_checkout helperPushkar Singh, Jan 11, 2026
  7. 2/2 t5403: use test_cmp for post-checkout argument checksDeveshi Dwivedi, Jan 11, 2026
  8. 0/2 t5403: improve post-checkout hook testingDeveshi Dwivedi, Jan 12, 2026
  9. 1/2 t5403:introduce check_post_checkout helper functionDeveshi Dwivedi, Jan 12, 2026
  10. Junio C HamanoJan 12, 2026
  11. 2/2 t5403: use test_cmp for post-checkout argument checksDeveshi Dwivedi, Jan 12, 2026
  12. 0/2 t5403: improve post-checkout hook testingDeveshi Dwivedi, Jan 12, 2026
  13. 1/2 t5403:introduce check_post_checkout helper functionDeveshi Dwivedi, Jan 12, 2026
  14. 2/2 t5403: use test_cmp for post-checkout argument checksDeveshi Dwivedi, Jan 12, 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.