mirror of
https://github.com/git/git.git
synced 2024-10-31 22:37:54 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -828,7 +828,7 @@ sub evaluate_path_info {
|
|||
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 a new issue