t5304: move `prune -h` test from t1517

t1517 is now focused on testing subcommands outside a repository. Move the in-repo `-h` test for `prune` to t5304, which covers this command. Suggested-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Usman Akinyemi committed Aug 8, 2025 at 06:36 UTC 529a60a885c1f65ff0870f6d69915dd9d02d7ee9
2 files changed +5 -7
t/t1517-outside-repo.sh
-7
@@ -107,13 +107,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
107 test_grep "^error: remote-curl" actual
108 '
109
110 -test_expect_success 'prune does not crash with -h' '
111 - test_expect_code 129 git prune -h >usage &&
112 - test_grep "[Uu]sage: git prune " usage &&
113 - test_expect_code 129 nongit git prune -h >usage &&
114 - test_grep "[Uu]sage: git prune " usage
115 -'
116 -
110 for cmd in $(git --list-cmds=main)
111 do
112 cmd=${cmd%.*} # strip .sh, .perl, etc.
t/t5304-prune.sh
+5
@@ -364,4 +364,9 @@ test_expect_success 'gc.recentObjectsHook' '
364 git cat-file -p $BLOB
365 '
366
367 +test_expect_success 'prune does not crash with -h' '
368 + test_expect_code 129 git prune -h >usage &&
369 + test_grep "[Uu]sage: git prune " usage
370 +'
371 +
372 test_done