Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 11, 2013, 07:22 UTC
- Message-ID
- <7v4nhjpb69.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAE_TNi=EG6vziVObJ-a__smeOv7RgZ5R146eonD6M828H7ziNQ@mail.gmail.com>
Ethan Reesor <firelizzard@gmail.com> writes:
Show 12 quoted lines
>> For those who _do_ want to give customized commands to their users, >> they can already have "help" script to give a friendly message. It >> just felt silly to force sites to create the directory only to >> refuse an access to the "custom commands" feature, especially when >> the existence of that directory is a signal that the site may want >> to give its users an acess to that feature. > > Again, would it not be more elegant and powerful to A) have the > shell-disabled message/hook/etc specified by git-config on some level, > be it /etc/gitconfig or ~/.gitconfig, and B) have Jonathan's patch > whereby ~/git-shell-commands/help returning non-zero closes the > connection?
Isn't that what I have essentially been saying?
For sites that do not want per-user customizable "other commands", have a single site-wide hook instead of having to create otherwise empty shell-commands directories for all users. For users a site wants to allow customized commands, have the directory and custom "help" message. I do not care too deeply if "help" exiting non-zero caused the connection closed, but I care about not forcing a lot of effort to customize messages to people who do *not* need customizability.