aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2015-02-20 14:28:53 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2015-02-21 19:03:51 +0530
commit9cd1e373e197e9191c6ed9b85da8a2b411e65f2f (patch)
tree65cb19244475f30b86acf4fceec932b75bace89d
parenttest suite: write user.* settings to ~/.gitconfig.local... (diff)
downloadgitolite-gentoo-9cd1e373e197e9191c6ed9b85da8a2b411e65f2f.tar.gz
gitolite-gentoo-9cd1e373e197e9191c6ed9b85da8a2b411e65f2f.tar.bz2
gitolite-gentoo-9cd1e373e197e9191c6ed9b85da8a2b411e65f2f.zip
allow gitolite-shell to be used as "$SHELL"...
Experts only; no support and no docs. Idea courtesy "calestyo"; see mails on Feb 20 or so in this: https://groups.google.com/forum/#!msg/gitolite/eLTiK8hvijo/9dKI8YfTSecJ
-rwxr-xr-xsrc/gitolite-shell6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gitolite-shell b/src/gitolite-shell
index e299ad2..e5e6f9c 100755
--- a/src/gitolite-shell
+++ b/src/gitolite-shell
@@ -36,6 +36,12 @@ my $soc = $ENV{SSH_ORIGINAL_COMMAND};
$soc =~ s/[\n\r]+/<<newline>>/g;
_die "I don't like newlines in the command: '$soc'\n" if $ENV{SSH_ORIGINAL_COMMAND} ne $soc;
+# allow gitolite-shell to be used as "$SHELL". Experts only; no support, no docs
+if (@ARGV and $ARGV[0] eq '-c') {
+ shift;
+ $ARGV[0] =~ s/^$0 //;
+}
+
# the INPUT trigger massages @ARGV and $ENV{SSH_ORIGINAL_COMMAND} as needed
trigger('INPUT');