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

[PATCH] t5403: document check_post_checkout helper

From
Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Date
Jan 11, 2026, 12:10 UTC
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 <args-file> <old> <new> <flag>
+#
+# 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 <args-file>.
 check_post_checkout () {
 	test "$#" = 4 || BUG "check_post_checkout takes 4 args"
 	read old new flag <"$1" &&
-- 
2.43.0
Previous: Deveshi DwivediNext: Deveshi Dwivedi
Message 6 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.