summaryrefslogtreecommitdiff
path: root/t/t0012-help.sh
diff options
context:
space:
mode:
authorRalf Thielow <ralf.thielow@gmail.com>2016-08-26 17:58:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-30 23:09:41 (GMT)
commit2c6b6d9f7d8a26b6ae6493584cc3d2a3cbae7358 (patch)
tree663be86da2e4ab3e2c57a13039c2a541540f7462 /t/t0012-help.sh
parentaf74128f4a447678daae4d59069fba8a0c797210 (diff)
downloadgit-2c6b6d9f7d8a26b6ae6493584cc3d2a3cbae7358.zip
git-2c6b6d9f7d8a26b6ae6493584cc3d2a3cbae7358.tar.gz
git-2c6b6d9f7d8a26b6ae6493584cc3d2a3cbae7358.tar.bz2
help: make option --help open man pages only for Git commands
If option --help is passed to a Git command, we try to open the man page of that command. However, we do it for both commands and concepts. Make sure it is an actual command. This makes "git <concept> --help" not working anymore, while "git help <concept>" still works. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0012-help.sh')
-rwxr-xr-xt/t0012-help.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0012-help.sh b/t/t0012-help.sh
index 920a663..8faba2e 100755
--- a/t/t0012-help.sh
+++ b/t/t0012-help.sh
@@ -41,4 +41,12 @@ test_expect_success "--exclude-guides does not work for guides" '
test_must_be_empty test-browser.log
'
+test_expect_success "--help does not work for guides" "
+ cat <<-EOF >expect &&
+ git: 'revisions' is not a git command. See 'git --help'.
+ EOF
+ test_must_fail git revisions --help 2>actual &&
+ test_i18ncmp expect actual
+"
+
test_done