diff options
author | Joey Hess <joey@kitenet.net> | 2008-09-05 20:26:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-19 04:48:19 +0200 |
commit | 53c3967647f79f1563d028d442f81cabba451ca6 (patch) | |
tree | 3cd06abad8982111b2a9e109ca734932ce749261 /gitweb | |
parent | Clarified gitattributes documentation regarding custom hunk header. (diff) | |
download | git-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-x | gitweb/gitweb.perl | 2 |
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 |