From: Thiago Farina Date: Sun, 20 Sep 2009 17:11:12 GMT Subject: [PATCH] Trivial fix: Display a more friendly message with git-shell. Message-ID: <1253466672-21051-1-git-send-email-tfransosi@gmail.com> Instead of simply die without give a helpful message, displays the usage string that shows to the user how it can be used. Signed-off-by: Thiago Farina --- shell.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/shell.c b/shell.c index e4864e0..aa7f47e 100644 --- a/shell.c +++ b/shell.c @@ -3,6 +3,8 @@ #include "exec_cmd.h" #include "strbuf.h" +static const char shell_usage[] = "git shell -c "; + static int do_generic_cmd(const char *me, char *arg) { const char *my_argv[4]; @@ -74,7 +76,7 @@ int main(int argc, char **argv) * where "cmd" is a very limited subset of git commands. */ else if (argc != 3 || strcmp(argv[1], "-c")) - die("What do you think I am? A shell?"); + usage(shell_usage); prog = argv[2]; if (!strncmp(prog, "git", 3) && isspace(prog[3])) -- 1.6.5.rc1.37.gf5c31.dirty