Am 3/5/2013 15:44, schrieb Ævar Arnfjörð Bjarmason:
> Change the semantics of "git <alias> --help" to show the help for the
> command <alias> is aliased to, instead of just saying:
>
> `git <alias>' is aliased to `<whatever>'
>
> E.g. if you have "checkout" aliased to "co" you won't get:
>
> $ git co --help
> `git co' is aliased to `checkout'
>
> But will instead get the manpage for git-checkout.
...
> alias = alias_lookup(argv[0]);
> if (alias && !is_git_command(argv[0])) {
> - printf_ln(_("`git %s' is aliased to `%s'"), argv[0], alias);
> - return 0;
> + show_help_for = alias;
> + } else {
> + show_help_for = argv[0];
> }
This needs a lot more scrutiny. The alias can be more than just a single
word, and it can even be a shell scriptlet, i.e., not a git command at all.
It may make sense to show the help of the aliased-to command if the alias
resolves to just a single word.
-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html