summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 10:51:14 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 11:38:39 +0100
commit8047fa8b32e744b4033cdbe451108fdb2ea0e505 (patch)
treed30e1f0b61b574095664af465dac63105c72b7aa
parent38e68231e64477cc87c3e899c6f547c62ec590e9 (diff)
Dgit.pm: printdebug: Strip empty strings from @_ and maybe quit early
Now the meat of the function always has nonempty $_[-1]. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--Debian/Dgit.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index c8a6faf..3d517e1 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -161,6 +161,8 @@ sub enabledebuglevel ($) {
sub printdebug {
return unless $debuglevel >= $printdebug_when_debuglevel;
print DEBUG $debugprefix;
+ pop @_ while @_ and !length $_[-1];
+ return unless @_;
print DEBUG @_ or die $!;
}