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:

committed by
Junio C Hamano

parent
3278fbc5ce
commit
e8bb4b38df
@ -828,7 +828,7 @@ if (!defined $action) {
|
|||||||
if (!defined($actions{$action})) {
|
if (!defined($actions{$action})) {
|
||||||
die_error(400, "Unknown action");
|
die_error(400, "Unknown action");
|
||||||
}
|
}
|
||||||
if ($action !~ m/^(opml|project_list|project_index)$/ &&
|
if ($action !~ m/^(?:opml|project_list|project_index)$/ &&
|
||||||
!$project) {
|
!$project) {
|
||||||
die_error(400, "Project needed");
|
die_error(400, "Project needed");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user