From: Jakub Narebski Date: Mon, 11 May 2009 17:39:43 +0000 (+0200) Subject: gitweb: Use capturing parentheses only when you intend to capture X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/23edf6c6b83a0c58c8e13da33d389a70264eb18a91173ae019ed59548fc19277?ds=sidebyside 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index 0997eb8..80475c2 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -829,7 +829,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"); }