Subject: | Suppress warnings when the log message is empty or short |
prepare_subject issues some warnings when the log message is missing or very short. We
should hit those users with sticks, but I think this at least gets rid of the warnings. I'm not
sure what you'd want to the subject otherwise.
diff --git a/lib/SVN/Notify.pm b/lib/SVN/Notify.pm
index 3f3672b..5387dd2 100644
--- a/lib/SVN/Notify.pm
+++ b/lib/SVN/Notify.pm
@@ -1308,7 +1308,7 @@ sub prepare_subject {
}
# Add the first sentence/line from the log message.
- unless ($self->{no_first_line}) {
+ if (!$self->{no_first_line} and defined $self->{message}[0] and length $self->{me
# Truncate to first period after a minimum of 10 characters.
my $i = index substr($self->{message}[0], 10), '. ';
$self->{subject} .= $i > 0