On Mon, Feb 11, 2013 at 2:01 AM, Junio C Hamano <gits...@pobox.com> wrote:
> And for the remaining 20% of those who do not like the canned
> message but still do not need any custom command, I think it is way
> suboptimal to force them to create git-shell-commands directory for
> 47 users his host gives git-shell access to, and copy the "help"
> script to all of them, only to get a customized message. It would
> help them quite a lot if you just called /etc/git/shell-disabled or
> some hook that generates a customized message; then there is no need
> to add any git-shell-commands directory and a "help" script every
> time he gets one new user, no?
> 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? Have shell.c read for settings in the pattern:
message = "Hi, this is your server speaking. I've
replaced the usual message."
command = "/path/to/some/command"
If shell.disabled.command is defined, don't bother with the message.
If it is not, but shell.disabled.message is, display that. If neither
of them are, display the default message, and make that one more
Even if that was implemented, there is still an argument for
Jonathan's patch. For example, I'm building a server where
~/git-shell-commands/help does something interesting. But sometimes,
something fails. When that something fails, I want to close the
connection for whatever reason.
So, any reason not to have both (on top of making a better default message)?
Ethan Reesor (Gmail)
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html