aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2008-09-05 14:26:29 -0400
committerJunio C Hamano <gitster@pobox.com>2008-09-18 19:48:19 -0700
commit53c3967647f79f1563d028d442f81cabba451ca6 (patch)
tree3cd06abad8982111b2a9e109ca734932ce749261
parentc882c01ef9c5a82c1282fd1cb094bb8f97472d7d (diff)
downloadgit-53c3967647f79f1563d028d442f81cabba451ca6.tar.gz
git-53c3967647f79f1563d028d442f81cabba451ca6.tar.xz
gitweb: avoid warnings for commits without body
In the unusual case when there is no commit message, gitweb would output an uninitialized value warning. Signed-off-by: Joey Hess <joey@kitenet.net> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99bf9..269f1125d 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2092,7 +2092,7 @@ sub parse_commit_text {
last;
}
}
- if ($co{'title'} eq "") {
+ if (! defined $co{'title'} || $co{'title'} eq "") {
$co{'title'} = $co{'title_short'} = '(no commit message)';
}
# remove added spaces