git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Thiago Farina <tfransosi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Trivial fix: Display a more friendly message with git-shell.
Date: Mon, 21 Sep 2009 08:17:26 +0200	[thread overview]
Message-ID: <4AB71A76.5010509@viscovery.net> (raw)
In-Reply-To: <1253466672-21051-1-git-send-email-tfransosi@gmail.com>

Thiago Farina schrieb:
> +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

  parent reply	other threads:[~2009-09-21  6:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-20 17:11 [PATCH] Trivial fix: Display a more friendly message with git-shell Thiago Farina
2009-09-21  4:21 ` Tay Ray Chuan
2009-09-21  6:17 ` Johannes Sixt [this message]
2009-09-21  6:45   ` Matthieu Moy
2009-09-21 20:45     ` Thiago Farina
2009-09-22  7:28       ` Matthieu Moy
2009-09-22  8:15         ` Heiko Voigt
2009-09-22  8:17         ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AB71A76.5010509@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=tfransosi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).