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

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
Previous: Tay Ray ChuanNext: Matthieu Moy
Message 3 of 8 in “Trivial fix: Display a more friendly message with git-shell.”
  1. Trivial fix: Display a more friendly message with git-shell.Thiago Farina, Sep 20, 2009
  2. Tay Ray ChuanSep 21, 2009
  3. Johannes SixtSep 21, 2009
  4. Matthieu MoySep 21, 2009
  5. Thiago FarinaSep 21, 2009
  6. Matthieu MoySep 22, 2009
  7. Heiko VoigtSep 22, 2009
  8. Jakub NarebskiSep 22, 2009

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.