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-Tag: v1.6.4-rc0~129^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5;p=git.git 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/gitweb.perl b/gitweb/gitweb.perl index beb79eebd..097bd18be 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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"); }