Re: [PATCH] Trivial fix: Display a more friendly message with git-shell.
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Sep 21, 2009, 06:17 UTC
- Message-ID
- <4AB71A76.5010509@viscovery.net>
- In-Reply-To
- <1253466672-21051-1-git-send-email-tfransosi@gmail.com>
Thiago Farina schrieb:
Show 11 quoted lines
> +static const char shell_usage[] = "git shell -c <command> <argument>";
> +
> 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);I don't think this is an improvement.
git-shell has a very limited use: It is to be used as the login-shell of accounts where the admin will allow ssh access, but only to git repositories.
Every other use of git-shell is an error, and the current error message says exactly that, although in a very 31337 way (and, BTW, /me likes it :-)
If an naive user runs git-shell from the command line, then your new message will not be helpful because git-shell will accept only a very restricted set of commands.
-- Hannes