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

[PATCH v2 6/7] t/t1517: move verify-commit -h test to t1517

From
Usman Akinyemi <usmanakinyemi202@gmail.com>
Date
Jul 6, 2025, 21:41 UTC
Message-ID
<20250706214108.714499-7-usmanakinyemi202@gmail.com>
In-Reply-To
<20250706214108.714499-1-usmanakinyemi202@gmail.com>

The test 'verify-commit does not crash with -h' checks that the command exits cleanly with usage information, both inside and outside of a repository.

Move this test from "t/t7510-signed-commit.sh" to "t1517-outside-repo.sh" since it better fits with tests that check command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh  | 7 +++++++
 t/t7510-signed-commit.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index a140b5cc38..42381ef7eb 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -149,4 +149,11 @@ test_expect_success 'send-pack does not crash with -h' '
 	test_grep "[Uu]sage: git send-pack " usage
 '
 
+test_expect_success 'verify-commit does not crash with -h' '
+	test_expect_code 129 git verify-commit -h >usage &&
+	test_grep "[Uu]sage: git verify-commit " usage &&
+	test_expect_code 129 nongit git verify-commit -h >usage &&
+	test_grep "[Uu]sage: git verify-commit " usage
+'
+
 test_done
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 39677e859a..0d2dd29fe6 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -8,13 +8,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GNUPGHOME_NOT_USED=$GNUPGHOME
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
-test_expect_success GPG 'verify-commit does not crash with -h' '
-	test_expect_code 129 git verify-commit -h >usage &&
-	test_grep "[Uu]sage: git verify-commit " usage &&
-	test_expect_code 129 nongit git verify-commit -h >usage &&
-	test_grep "[Uu]sage: git verify-commit " usage
-'
-
 test_expect_success GPG 'create signed commits' '
 	test_oid_cache <<-\EOF &&
 	header sha1:gpgsig
-- 
2.50.0
Previous: Usman AkinyemiNext: Usman Akinyemi
Message 7 of 53 in “move builtin help test to t1517”
  1. 0/7 move builtin help test to t1517Usman Akinyemi, Jul 6, 2025
  2. 1/7 t/t1517: move checkout-index -h test to t1517Usman Akinyemi, Jul 6, 2025
  3. 2/7 t/t1517: move for-each-ref -h test to t1517Usman Akinyemi, Jul 6, 2025
  4. 3/7 t/t1517: move ls-files -h test to t1517Usman Akinyemi, Jul 6, 2025
  5. 4/7 t/t1517: move pack-refs -h test to t1517Usman Akinyemi, Jul 6, 2025
  6. 5/7 t/t1517: move send-pack -h test to t1517Usman Akinyemi, Jul 6, 2025
  7. 6/7 t/t1517: move verify-commit -h test to t1517Usman Akinyemi, Jul 6, 2025
  8. 7/7 t/t1517: move verify-tag -h test to t1517Usman Akinyemi, Jul 6, 2025
  9. 0/7 move builtin help test to t1517Usman Akinyemi, Jul 6, 2025
  10. 1/7 t/t1517: move checkout-index -h test to t1517Usman Akinyemi, Jul 6, 2025
  11. 2/7 t/t1517: move for-each-ref -h test to t1517Usman Akinyemi, Jul 6, 2025
  12. 3/7 t/t1517: move ls-files -h test to t1517Usman Akinyemi, Jul 6, 2025
  13. 4/7 t/t1517: move pack-refs -h test to t1517Usman Akinyemi, Jul 6, 2025
  14. 5/7 t/t1517: move send-pack -h test to t1517Usman Akinyemi, Jul 6, 2025
  15. 6/7 t/t1517: move verify-commit -h test to t1517Usman Akinyemi, Jul 6, 2025
  16. Junio C HamanoJul 7, 2025
  17. Usman AkinyemiJul 10, 2025
  18. Junio C HamanoJul 11, 2025
  19. 0/2 refactor t1517 to focus on help output outside a repositoryUsman Akinyemi, Jul 21, 2025
  20. 1/2 t/t1517: automate `git subcmd -h` tests outside a repositoryUsman Akinyemi, Jul 21, 2025
  21. D. Ben KnobleJul 26, 2025
  22. Usman AkinyemiJul 26, 2025
  23. D. Ben KnobleJul 30, 2025
  24. Junio C HamanoJul 28, 2025
  25. D. Ben KnobleAug 2, 2025
  26. Usman AkinyemiAug 3, 2025
  27. D. Ben KnobleJul 26, 2025
  28. D. Ben KnobleJul 26, 2025
  29. Usman AkinyemiJul 26, 2025
  30. D. Ben KnobleJul 30, 2025
  31. Junio C HamanoJul 28, 2025
  32. Phillip WoodAug 26, 2025
  33. D. Ben KnobleAug 28, 2025
  34. Phillip WoodAug 29, 2025
  35. D. Ben KnobleAug 29, 2025
  36. Junio C HamanoAug 29, 2025
  37. Usman AkinyemiAug 30, 2025
  38. 2/2 t5200: move `update-server-info -h` test from t1517Usman Akinyemi, Jul 21, 2025
  39. D. Ben KnobleJul 26, 2025
  40. 0/3 refactor t1517 to focus on help output outside a repositoryUsman Akinyemi, Aug 3, 2025
  41. 1/3 t/t1517: automate `git subcmd -h` tests outside a repositoryUsman Akinyemi, Aug 3, 2025
  42. D. Ben KnobleAug 3, 2025
  43. Junio C HamanoAug 3, 2025
  44. Usman AkinyemiAug 6, 2025
  45. 2/3 t5200: move `update-server-info -h` test from t1517Usman Akinyemi, Aug 3, 2025
  46. 3/3 t5304: move `prune -h` test from t1517Usman Akinyemi, Aug 3, 2025
  47. 0/3 refactor t1517 to focus on help output outside a repositoryUsman Akinyemi, Aug 8, 2025
  48. 1/3 t/t1517: automate `git subcmd -h` tests outside a repositoryUsman Akinyemi, Aug 8, 2025
  49. 2/3 t5200: move `update-server-info -h` test from t1517Usman Akinyemi, Aug 8, 2025
  50. 3/3 t5304: move `prune -h` test from t1517Usman Akinyemi, Aug 8, 2025
  51. Junio C HamanoAug 8, 2025
  52. D. Ben KnobleAug 9, 2025
  53. 7/7 t/t1517: move verify-tag -h test to t1517Usman Akinyemi, Jul 6, 2025

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.