summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2008-09-05 18:26:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-09-19 02:48:19 (GMT)
commit53c3967647f79f1563d028d442f81cabba451ca6 (patch)
tree3cd06abad8982111b2a9e109ca734932ce749261 /gitweb
parentc882c01ef9c5a82c1282fd1cb094bb8f97472d7d (diff)
downloadgit-53c3967647f79f1563d028d442f81cabba451ca6.zip
git-53c3967647f79f1563d028d442f81cabba451ca6.tar.gz
git-53c3967647f79f1563d028d442f81cabba451ca6.tar.bz2
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99b..269f112 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