public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] t5403: improve post-checkout hook testing
@ 2026-01-11  7:29 Deveshi Dwivedi
  2026-01-11  7:29 ` [PATCH 1/2] t5403:introduce check_post_checkout helper function Deveshi Dwivedi
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Deveshi Dwivedi @ 2026-01-11  7:29 UTC (permalink / raw)
  To: git; +Cc: Deveshi Dwivedi

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.


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 | 49 +++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 23 deletions(-)

-- 
2.52.0.230.gd8af7cadaa


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-01-12 16:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11  7:29 [PATCH 0/2] t5403: improve post-checkout hook testing Deveshi Dwivedi
2026-01-11  7:29 ` [PATCH 1/2] t5403:introduce check_post_checkout helper function Deveshi Dwivedi
2026-01-11  7:53   ` Eric Sunshine
2026-01-11 11:01     ` Pushkar Singh
2026-01-12  6:44     ` Deveshi Dwivedi
2026-01-11 12:10   ` [PATCH] t5403: document check_post_checkout helper Pushkar Singh
2026-01-11  7:29 ` [PATCH 2/2] t5403: use test_cmp for post-checkout argument checks Deveshi Dwivedi
2026-01-12  6:52 ` [PATCH v2 0/2] t5403: improve post-checkout hook testing Deveshi Dwivedi
2026-01-12  6:53   ` [PATCH v2 1/2] t5403:introduce check_post_checkout helper function Deveshi Dwivedi
2026-01-12 14:48     ` Junio C Hamano
2026-01-12  6:53   ` [PATCH v2 2/2] t5403: use test_cmp for post-checkout argument checks Deveshi Dwivedi
2026-01-12 16:36 ` [PATCH v3 0/2] t5403: improve post-checkout hook testing Deveshi Dwivedi
2026-01-12 16:36   ` [PATCH v3 1/2] t5403:introduce check_post_checkout helper function Deveshi Dwivedi
2026-01-12 16:36   ` [PATCH v3 2/2] t5403: use test_cmp for post-checkout argument checks Deveshi Dwivedi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox