git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] help: change a message to be more precise

From
Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Date
Sep 12, 2017, 11:14 UTC
Message-ID
<20170912111406.6749-1-kaarticsivaraam91196@gmail.com>

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>
---
 builtin/help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/help.c b/builtin/help.c
index 334a8494a..dbe45c596 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -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);
 	}
-- 
2.14.1.1006.g90ad9a07c
Message 1 of 1 in “help: change a message to be more precise”
  1. help: change a message to be more preciseKaartic Sivaraam, Sep 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.