chiark / gitweb /
Make dgit-ssh-dispatch not spew (harmless) warnings if caller tries for a shell sessi...
[dgit.git] / infra / dgit-ssh-dispatch
index 6d4efbff655d61d0b746f96d00cb540266677ff0..9c023d80859fecd63cbc6ca64dfc925818bfc473 100755 (executable)
@@ -32,6 +32,7 @@ our $qre = '["'."']?";
 # diverts should be list of
 #  <pat> [<divert-to>]
 # where <pat> is a package name pattern which may contain * or literals.
+# <divert-to> is for `git config dgit-distro.DISTRO.diverts.<divert-to>'
 
 our ($distro,$pkg, $d);
 our ($dgitlive,$repos,$suites,$diverts,$policyhook,$repo);
@@ -118,7 +119,7 @@ sub serve_up ($) {
 }
 
 sub dispatch () {
-    local ($_) = $ENV{'SSH_ORIGINAL_COMMAND'};
+    local ($_) = $ENV{'SSH_ORIGINAL_COMMAND'} // '';
 
     if (m#^: dgit ($lre) git-check ($lre) ;#) {
        selectpackage $1,$2, sub { prl "divert @_"; finish; };