]> Lady’s Gitweb - Gitweb/commit
gitweb: Silence 'Variable VAR may be unavailable' warnings
authorJakub Narebski <redacted>
Fri, 30 Apr 2010 16:30:31 +0000 (18:30 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:39 +0000 (00:50 -0400)
commitae7c85174d10f98fd8fe7fdafc44af49417c552e85e889b55de545f613e452d4
tree9ec1f73266ec1ef9f2238faba45719717c0738fa0ef0603d372858dafc8c342d
parent5f7881f34fa4544af309bfb1e4d8b6ca6424ee8cc5dba98d90bd2430b7e2c5df
gitweb: Silence 'Variable VAR may be unavailable' warnings

When $projects_list points to a directory, and git_get_projects_list
scans this directory for repositories, there can be generated the
following warnings (for persistent services like mod_perl or plackup):

  Variable "$project_maxdepth" may be unavailable at gitweb.cgi line 2443.
  Variable "$projectroot" may be unavailable at gitweb.cgi line 2451.

Those are false positives; silence those warnings by explicitely
declaring $project_maxdepth and $projectroot with 'our', as global
variables, in anonymous subrotine passed to File::Find::find.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.249778 seconds and 4 git commands to generate.