]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: avoid warnings for commits without body
authorJoey Hess <redacted>
Fri, 5 Sep 2008 18:26:29 +0000 (14:26 -0400)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:33 +0000 (00:07 -0400)
In the unusual case when there is no commit message, gitweb would
output an uninitialized value warning.

Signed-off-by: Joey Hess <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index c763d1d4e79a2f89458c3a1a8753422c73758c695efb8a6349b6624590618ed5..95a3415f4140be21d3e41c7ca81076659eed370eae87c9d1fce3b9acc1c3a81e 100755 (executable)
@@ -2124,7 +2124,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
This page took 0.317458 seconds and 4 git commands to generate.