chiark / gitweb /
Test suite: quilt-gb-build-modes: Test --clean=dpkg-source too
[dgit.git] / infra / dgit-ssh-dispatch
index 6d4efbff655d61d0b746f96d00cb540266677ff0..17db26887ce744c92704eaa69d1fdafb6e5edaee 100755 (executable)
@@ -1,9 +1,11 @@
 #!/usr/bin/perl -w
 
 use strict;
-use POSIX;
 
 use Debian::Dgit;
+setup_sigwarn();
+
+use POSIX;
 
 open DEBUG, '>/dev/null' or die $!;
 if (@ARGV && $ARGV[0] eq '-D') {
@@ -32,6 +34,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 +121,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; };