git.c: handle_alias: prepend alias info when first argument is -h
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index a6f4b44af520627bd1d7caaaf38ba6356ef807b3..0211c2d4c05029dca2a4eccf102d659b3b796ae5 100644 (file)
--- a/git.c
+++ b/git.c
@@ -318,6 +318,9 @@ static int handle_alias(int *argcp, const char ***argv)
        alias_command = (*argv)[0];
        alias_string = alias_lookup(alias_command);
        if (alias_string) {
+               if (*argcp > 1 && !strcmp((*argv)[1], "-h"))
+                       fprintf_ln(stderr, _("'%s' is aliased to '%s'"),
+                                  alias_command, alias_string);
                if (alias_string[0] == '!') {
                        struct child_process child = CHILD_PROCESS_INIT;
                        int nongit_ok;