From: Pushkar Singh Date: Sun, 11 Jan 2026 12:10:07 GMT Subject: [PATCH] t5403: document check_post_checkout helper Message-ID: <20260111121218.33935-1-pushkarkumarsingh1970@gmail.com> In-Reply-To: <20260111072950.9463-2-deveshigurgaon@gmail.com> --- t/t5403-post-checkout-hook.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh index 63a2221441..31ad369b3f 100755 --- a/t/t5403-post-checkout-hook.sh +++ b/t/t5403-post-checkout-hook.sh @@ -9,7 +9,11 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -# Helper function to check post-checkout hook arguments +# Usage: check_post_checkout +# +# Verifies that the post-checkout hook wrote the expected old and new +# object IDs and the expected flag (1 for branch switch, 0 otherwise) +# into . check_post_checkout () { test "$#" = 4 || BUG "check_post_checkout takes 4 args" read old new flag <"$1" && -- 2.43.0