lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] avoid gitweb uninitialized value warning
- Date: Fri, 5 Sep 2008 14:26:29 -0400
- From: Joey Hess <joey@xxxxxxxxxxx>
- Subject: [PATCH] avoid gitweb uninitialized value warning
In the ususual case when there is no commit message, gitweb would
output an uninitialized value warning.
Signed-off-by: Joey Hess <joey@xxxxxxxxxxx>
---
gitweb/gitweb.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 29e2156..da474d0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2123,7 +2123,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
--
1.5.6.5
--
see shy jo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html