gitweb: Use capturing parentheses only when you intend to capture
Non-capturing groups are useful because they have better runtime performance and do not copy strings to the magic global capture variables. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3278fbc5ce
commit
e8bb4b38df
@ -828,7 +828,7 @@ if (!defined $action) {
|
||||
if (!defined($actions{$action})) {
|
||||
die_error(400, "Unknown action");
|
||||
}
|
||||
if ($action !~ m/^(opml|project_list|project_index)$/ &&
|
||||
if ($action !~ m/^(?:opml|project_list|project_index)$/ &&
|
||||
!$project) {
|
||||
die_error(400, "Project needed");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user