Git fork

Merge branch 'ua/t1517-short-help-tests'

Test shuffling.

* ua/t1517-short-help-tests:
t5304: move `prune -h` test from t1517
t5200: move `update-server-info -h` test from t1517
t/t1517: automate `git subcmd -h` tests outside a repository

+37 -13
+27 -13
t/t1517-outside-repo.sh
··· 107 107 test_grep "^error: remote-curl" actual 108 108 ' 109 109 110 - test_expect_success 'update-server-info does not crash with -h' ' 111 - test_expect_code 129 git update-server-info -h >usage && 112 - test_grep "[Uu]sage: git update-server-info " usage && 113 - test_expect_code 129 nongit git update-server-info -h >usage && 114 - test_grep "[Uu]sage: git update-server-info " usage 115 - ' 116 - 117 - test_expect_success 'prune does not crash with -h' ' 118 - test_expect_code 129 git prune -h >usage && 119 - test_grep "[Uu]sage: git prune " usage && 120 - test_expect_code 129 nongit git prune -h >usage && 121 - test_grep "[Uu]sage: git prune " usage 122 - ' 110 + for cmd in $(git --list-cmds=main) 111 + do 112 + cmd=${cmd%.*} # strip .sh, .perl, etc. 113 + case "$cmd" in 114 + archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \ 115 + difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \ 116 + http-backend | http-fetch | http-push | init-db | \ 117 + merge-octopus | merge-one-file | merge-resolve | mergetool | \ 118 + mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \ 119 + remote-http | remote-https | replay | send-email | \ 120 + sh-i18n--envsubst | shell | show | stage | submodule | svn | \ 121 + upload-archive--writer | upload-pack | web--browse | whatchanged) 122 + expect_outcome=expect_failure ;; 123 + *) 124 + expect_outcome=expect_success ;; 125 + esac 126 + case "$cmd" in 127 + instaweb) 128 + prereq=PERL ;; 129 + *) 130 + prereq= ;; 131 + esac 132 + test_$expect_outcome $prereq "'git $cmd -h' outside a repository" ' 133 + test_expect_code 129 nongit git $cmd -h >usage && 134 + test_grep "[Uu]sage: git $cmd " usage 135 + ' 136 + done 123 137 124 138 test_done
+5
t/t5200-update-server-info.sh
··· 46 46 test_must_be_empty dups 47 47 ' 48 48 49 + test_expect_success 'update-server-info does not crash with -h' ' 50 + test_expect_code 129 git update-server-info -h >usage && 51 + test_grep "[Uu]sage: git update-server-info " usage 52 + ' 53 + 49 54 test_done
+5
t/t5304-prune.sh
··· 364 364 git cat-file -p $BLOB 365 365 ' 366 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 + 367 372 test_done