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>
This commit is contained in:

committed by
Junio C Hamano

parent
c882c01ef9
commit
53c3967647
@ -2092,7 +2092,7 @@ sub parse_commit_text {
|
|||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($co{'title'} eq "") {
|
if (! defined $co{'title'} || $co{'title'} eq "") {
|
||||||
$co{'title'} = $co{'title_short'} = '(no commit message)';
|
$co{'title'} = $co{'title_short'} = '(no commit message)';
|
||||||
}
|
}
|
||||||
# remove added spaces
|
# remove added spaces
|
||||||
|
Reference in New Issue
Block a user