summaryrefslogtreecommitdiffstats
path: root/gitweb
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2008-09-05 20:26:29 +0200
committerJunio C Hamano <gitster@pobox.com>2008-09-19 04:48:19 +0200
commit53c3967647f79f1563d028d442f81cabba451ca6 (patch)
tree3cd06abad8982111b2a9e109ca734932ce749261 /gitweb
parentClarified gitattributes documentation regarding custom hunk header. (diff)
downloadgit-53c3967647f79f1563d028d442f81cabba451ca6.tar.xz
git-53c3967647f79f1563d028d442f81cabba451ca6.zip
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 90cd99bf91..269f1125d9 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