Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: avoid warnings for commits without body
author
Joey Hess
<joey@kitenet.net>
Fri, 5 Sep 2008 18:26:29 +0000
(14:26 -0400)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 19 Sep 2008 02:48:19 +0000
(19:48 -0700)
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>
gitweb/gitweb.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
c882c01
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index 90cd99bf916135e5c0a9e1bd7d5e9ff45555c489..269f1125d9442cb4e0eaecb9069af1d32b4d947b 100755
(executable)
--- 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