chiark / gitweb /
split brain cache: Fix a wrong implicit reference to $_. Closes:#841383.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Oct 2016 14:05:59 +0000 (15:05 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Oct 2016 14:06:05 +0000 (15:06 +0100)
Otherwise we can get:

  Use of uninitialized value $_ in pattern match (m//) at /usr/bin/dgit
  line 4364.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 33b627ea84efbda7e77bcff4f96e621eb4509cf5..99e724d00609a33b5d6e2839c6b55e0537b1603f 100644 (file)
@@ -4,6 +4,8 @@ dgit (2.4~) unstable; urgency=low
     Usually the user is a maintainer using split brain, and we should rely
     on their own gbp configuration to specify the right check.
     Closes:#841100.
+  * split brain cache: Fix a wrong implicit reference to $_.
+    Closes:#841383.
 
  --
 
diff --git a/dgit b/dgit
index 08afd13deb9752690c99e7404ac9b1b87e2590dc..d51220b02ecef3e8748e6e366bcbee70a8015afd 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4363,7 +4363,7 @@ sub quilt_check_splitbrain_cache ($$) {
     my $srcshash = Digest::SHA->new(256);
     my %sfs = ( %INC, '$0(dgit)' => $0 );
     foreach my $sfk (sort keys %sfs) {
-       next unless m/^\$0\b/ || m{^Debian/Dgit\b};
+       next unless $sfk =~ m/^\$0\b/ || $sfk =~ m{^Debian/Dgit\b};
        $srcshash->add($sfk,"  ");
        $srcshash->add(hashfile($sfs{$sfk}));
        $srcshash->add("\n");