Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitweb: fix tests on uninitialized hash indexes to avoid uninitialized value warnings in server log #617

Open
wants to merge 1 commit into
base: maint
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gitweb/README
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ AUTHORS
Originally written by:
Kay Sievers <[email protected]>

Perl warning fix:
Raphaël Gertz <[email protected]>

Any comment/question/concern to:
Git mailing list <[email protected]>
4 changes: 2 additions & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ sub href {

# since we destructively absorb parameters, we keep this
# boolean that remembers if we're handling a snapshot
my $is_snapshot = $params{'action'} eq 'snapshot';
my $is_snapshot = defined $params{'action'} && $params{'action'} eq 'snapshot';

# Summary just uses the project path URL, any other action is
# added to the URL
Expand Down Expand Up @@ -5998,7 +5998,7 @@ sub git_history_body {
$cgi->a({-href => href(action=>$ftype, hash_base=>$commit, file_name=>$file_name)}, $ftype) . " | " .
$cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff");

if ($ftype eq 'blob') {
if (defined $ftype && $ftype eq 'blob') {
print " | " .
$cgi->a({-href => href(action=>"blob_plain", hash_base=>$commit, file_name=>$file_name)}, "raw");

Expand Down