summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-11 16:22:30 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-11 16:24:09 +0000
commitc79b89f1d2f6f119ec98b281e532b6dddb3ccb13 (patch)
tree33655ec26c045cbf75330f07f4c9d9d540195942 /dgit
parenta3bc65b9a277b2cd9c15fe2bf25dd96666699848 (diff)
dgit: polluted source-only changes: tidying
Make this function a bit easier to read. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit11
1 files changed, 6 insertions, 5 deletions
diff --git a/dgit b/dgit
index 92aacdc..6f1e6cd 100755
--- a/dgit
+++ b/dgit
@@ -2050,11 +2050,12 @@ sub test_source_only_changes ($) {
foreach my $l (split /\n/, getfield $changes, 'Files') {
$l =~ m/\S+$/ or next;
# \.tar\.[a-z0-9]+ covers orig.tar and the tarballs in native packages
- unless ($& =~ m/(?:\.dsc|\.diff\.gz|$tarball_f_ext_re|_source\.buildinfo)$/) {
- print STDERR
- f_ "purportedly source-only changes polluted by %s\n", $&;
- return 0;
- }
+ $_ = $&;
+ next if m/(?:\.dsc|\.diff\.gz|$tarball_f_ext_re)$/;
+ next if m/_source\.buildinfo$/;
+ print STDERR
+ f_ "purportedly source-only changes polluted by %s\n", $&;
+ return 0;
}
return 1;
}