From: Ian Jackson Date: Sat, 11 Aug 2018 09:51:14 +0000 (+0100) Subject: Dgit.pm: printdebug: Strip empty strings from @_ and maybe quit early X-Git-Tag: archive/debian/6.7~142 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=8047fa8b32e744b4033cdbe451108fdb2ea0e505;hp=38e68231e64477cc87c3e899c6f547c62ec590e9 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 --- diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index c8a6fafe..3d517e1e 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 $!; }