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>
Jakub Narebski committed
May 11, 2009 at 19:39 UTC
e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5
1 file changed
+1
-1
gitweb/gitweb.perl
+1
-1
@@ -828,7 +828,7 @@ if (!defined $action) {
828
if (!defined($actions{$action})) {
829
die_error(400, "Unknown action");
830
}
831
-if ($action !~ m/^(opml|project_list|project_index)$/ &&
831
+if ($action !~ m/^(?:opml|project_list|project_index)$/ &&
832
!$project) {
833
die_error(400, "Project needed");
834
}