Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Feb 11, 2013, 04:17 UTC
- Message-ID
- <20130211041706.GB15329@elie.Belkin>
- In-Reply-To
- <7v7gmfqzt1.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 10 quoted lines
>> How about this? >> >> A patch on top could change the default "git-shell-commands is not >> present" message if that seems worthwhile. > > Hmph. > > I wonder if rewording the message when git-shell-commmands directory > is not there may be a better first step (which actually could be the > last step)?
Maybe, but it's not a step that I'm interested in. I don't think it changes the desirability of the patch I sent. They are independent.
[...]
Show 13 quoted lines
> --- a/shell.c
> +++ b/shell.c
> @@ -162,9 +162,11 @@ int main(int argc, char **argv)
> /* Allow the user to run an interactive shell */
> cd_to_homedir();
> if (access(COMMAND_DIR, R_OK | X_OK) == -1) {
> - die("Interactive git shell is not enabled.\n"
> + die("The user has been recognized as '%s' but "
> + "interactive git shell is not enabled.\n"
> "hint: ~/" COMMAND_DIR " should exist "
> - "and have read and execute access.");
> + "and have read and execute access.",
> + get_user_name());Personally I don't think the hint should be here at all (it should be obvious that git-shell(1) is the place to read about the login behavior of an account with shell set to git-shell), but I don't mind as long as it's possible to override the message.
Thanks, Jonathan