diff options
author | Joey Hess <joey@kitenet.net> | 2008-09-05 14:26:29 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-18 19:48:19 -0700 |
commit | 53c3967647f79f1563d028d442f81cabba451ca6 (patch) | |
tree | 3cd06abad8982111b2a9e109ca734932ce749261 | |
parent | c882c01ef9c5a82c1282fd1cb094bb8f97472d7d (diff) | |
download | git-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-x | gitweb/gitweb.perl | 2 |
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 |