Merge branch 'rv/alias-help'
authorJunio C Hamano <gitster@pobox.com>
Fri, 26 Oct 2018 05:22:13 +0000 (14:22 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Oct 2018 05:22:13 +0000 (14:22 +0900)
"git cmd --help" when "cmd" is aliased used to only say "cmd is
aliased to ...". Now it shows that to the standard error stream
and runs "git $cmd --help" where $cmd is the first word of the
alias expansion.

This could be misleading for those who alias a command with options
(e.g. with "[alias] cpn = cherry-pick -n", "git cpn --help" would
show the manual of "cherry-pick", and the reader would not be told
to pay close attention to the part that describes the "--no-commit"
option until closing the pager that showed the contents of the
manual, if the pager is configured to restore the original screen,
or would not be told at all, if the pager simply makes the message
on the standard error scroll away.

* rv/alias-help:
git-help.txt: document "git help cmd" vs "git cmd --help" for aliases
git.c: handle_alias: prepend alias info when first argument is -h
help: redirect to aliased commands for "git cmd --help"

1  2 
Documentation/git-help.txt
builtin/help.c
git.c
Simple merge
diff --cc builtin/help.c
Simple merge
diff --cc git.c
Simple merge