Thread (23 messages) flat view 23 messages, 4 authors, 2016-06-15

Re: [PATCH v4 1/2] gitweb: add project_filter to limit project list to a subdirectory

From: Bernhard R. Link <hidden>
Date: 2016-06-15 22:52:53

Possibly related (same subject, not in this thread)

* Junio C Hamano [off-list ref] [120129 22:06]:
quoted
@@ -2864,6 +2873,10 @@ sub git_get_projects_list {
 				}
 
 				my $path = substr($File::Find::name, $pfxlen + 1);
+				# paranoidly only filter here
+				if ($paranoid && $filter && $path !~ m!^\Q$filter\E/!) {
+					next;
+				}
When you find "foo" directory and a project_filter tells you to match
"foo", because $path does not match "^foo/", it will not match (even
though its subdirectory "foo/bar" would)?
Yes, for consistency with what would be shown with a project list file.
(And that it would only show projects which would have a link to this
directory in their breadcrumbs (with 2/2)).
Perhaps that is the topic of your second patch. I dunno.
Yes, that is what the second patch does.

        Bernhard R. Link
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help