]> Kevux Git Server - rit/commit
t5403: use test_cmp for post-checkout argument checks
authorDeveshi Dwivedi <deveshigurgaon@gmail.com>
Mon, 12 Jan 2026 16:36:43 +0000 (16:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jan 2026 19:58:27 +0000 (11:58 -0800)
commit7a747f972d73d9419603d8127514cf188ed7a9ab
tree3359604c3e67af58a5a881f159ba963079da2494
parent1954b943227f2455d97e3b35ce106c203471b0ba
t5403: use test_cmp for post-checkout argument checks

Update check_post_checkout and the post-checkout hook implementation to
use test_cmp instead of individual test commands. This provides better
error messages when tests fail, making it easier to debug which specific
argument (old ref, new ref, or flag) was incorrect.

The hook now outputs in key=value format which test_cmp can display
clearly when there's a mismatch.

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