help: change a message to be more precise
authorKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Tue, 12 Sep 2017 11:14:06 +0000 (16:44 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Sep 2017 06:01:47 +0000 (15:01 +0900)
When the user tries to use '--help' option on an aliased command
information about the alias is printed as sshown below,

$ git co --help
`git co' is aliased to `checkout'

This doesn't seem correct as the user has aliased only 'co' and not
'git co'. This might even be incorrect in cases in which the user has
used an alias like 'tgit'.

$ tgit co --help
`git co' is aliased to `checkout'

So, make the message more precise.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c
index 334a8494abcc4ac52babf468d8a1ef415aa7f297..dbe45c5962890f32a0e0dccff809a33c87c4e32d 100644 (file)
@@ -438,7 +438,7 @@ static const char *check_git_cmd(const char* cmd)
 
        alias = alias_lookup(cmd);
        if (alias) {
-               printf_ln(_("`git %s' is aliased to `%s'"), cmd, alias);
+               printf_ln(_("'%s' is aliased to '%s'"), cmd, alias);
                free(alias);
                exit(0);
        }