[devscripts] 01/02: bts: Ensure edit() returns an undef if $filename is empty

James McCoy jamessan at debian.org
Fri Sep 26 00:49:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit f64ff0ecc15e1808fb0be0a7bf7e11d4dfeb00d4
Author: James McCoy <jamessan at debian.org>
Date:   Thu Sep 25 20:31:50 2014 -0400

    bts: Ensure edit() returns an undef if $filename is empty
    
    This is needed to relay the intent to cancel sending the email to the
    calling functions.
    
    Closes: #762888
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog | 2 ++
 scripts/bts.pl   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index da38635..610794d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ devscripts (2.14.7) UNRELEASED; urgency=low
       Prévot for the patch.  (Closes: #739137)
   * mk-origtargz: Add a --repack-suffix option to adjust the upstream version
     when the upstream sources are modified (e.g., due to Files-Excluded).
+  * bts: Don't send the email when the user saves an empty body for the email.
+    (Closes: #762888)
 
   [ Benjamin Drung ]
   * Remove unused build-dependencies libjson-perl and libterm-size-perl
diff --git a/scripts/bts.pl b/scripts/bts.pl
index bfd3734..b156edf 100755
--- a/scripts/bts.pl
+++ b/scripts/bts.pl
@@ -3973,7 +3973,7 @@ sub edit {
     system("sensible-editor $filename");
     open(OUT_MAIL, "<$filename")
 	or die "$progname: reading from temporary file: $!\n";
-    $message = "";
+    undef $message;
     while(<OUT_MAIL>) {
 	$message .= $_;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list