avoid gitweb uninitialized value warning
PATCH 1/1 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 <[email protected]>
--- gitweb/gitweb.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
gitweb/gitweb.perl +1 -1
@@ -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
Signature · 4 lines
1.5.6.5 -- see shy jo
Quoted 1 line · Joey Hess
Subject: [PATCH] avoid gitweb uninitialized value warning
I would say _where_ this uninitialized value warning was, e.g.
Subject: [PATCH] gitweb: avoid warnings for commits with no body
Quoted 3 lines
In the ususual case when there is no commit message, gitweb would output an uninitialized value warning.
Typo: s/ususual/unusual/
Quoted 2 lines
Signed-off-by Joey Hess <[email protected]>
Acked-by Jakub Narebski <[email protected]>
Quoted 9 lines
--- gitweb/gitweb.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)gitweb/gitweb.perl +0
-0
gitweb/gitweb.perl sub parse_commit_text { · line 2126
Quoted 5 lines
gitweb/gitweb.perl +1
-1@@ -2123,7 +2123,7 @@ sub parse_commit_text { last; } } - if ($co{'title'} eq "") { + if (! defined $co{'title'} || $co{'title'} eq "") {
I would avoid space between logical negation operator '!' and its operand, i.e. I would write:
+ if (!defined $co{'title'} || $co{'title'} eq "") {
Quoted 8 lines
gitweb/gitweb.perl +0
-0$co{'title'} = $co{'title_short'} = '(no commit message)'; } # remove added spacesSignature · 4 lines
1.5.6.5 -- see shy jo
Signature · 3 lines
Jakub Narebski Poland ShadeHawk on #git