gitweb: add project_filter to limit project list to a subdirectory
authorBernhard R. Link <redacted>
Mon, 30 Jan 2012 20:07:37 +0000 (21:07 +0100)
committerJunio C Hamano <redacted>
Wed, 1 Feb 2012 20:52:49 +0000 (12:52 -0800)
commit19d2d23998bba7c7f0ee87451ddbbf8906381939
treed99a06fa9cb96c4cdb76076be523acf0263f8ff9
parent348a6589e016669a3cf2d71c612e32dde9ef6f27
gitweb: add project_filter to limit project list to a subdirectory

This commit changes the project listing views (project_list,
project_index and opml) to limit the output to only projects in a
subdirectory if the new optional parameter ?pf=directory name is
used.

The implementation of the filter reuses the implementation used for
the 'forks' action (i.e. listing all projects within that directory
from the projects list file (GITWEB_LIST) or only projects in the
given subdirectory of the project root directory without a projects
list file).

Reusing $project instead of adding a new parameter would have been
nicer from a UI point-of-view (including PATH_INFO support) but
would complicate the $project validating code that is currently
being used to ensure nothing is exported that should not be viewable.

Signed-off-by: Bernhard R. Link <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb/gitweb.perl
git clone https://git.99rst.org/PROJECT