]> Kevux Git Server - rit/commit
t5403: introduce check_post_checkout helper function
authorDeveshi Dwivedi <deveshigurgaon@gmail.com>
Mon, 12 Jan 2026 16:36:42 +0000 (16:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jan 2026 19:58:24 +0000 (11:58 -0800)
commit1954b943227f2455d97e3b35ce106c203471b0ba
treee46eda5d4ff0073fbd42b437eb7b17e559f32b20
parent861dbb1586aaac6f02c8c87dd55e5c0b9862296a
t5403: introduce check_post_checkout helper function

The test file repeatedly uses the same four-line pattern to validate
post-checkout hook arguments: read the args file, then test each of
the three values individually.

Introduce a check_post_checkout helper function that encapsulates this
pattern. This patch does not change test behavior; it prepares the
code for improvement in the next step.

Additionally, the 'post-checkout hook is triggered by clone' test is
improved to validate the hook arguments (old ref, new ref, and flag)
rather than just checking that the hook file was created.

Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5403-post-checkout-hook.sh