Browse Source

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>
maint
Jakub Narebski 16 years ago committed by Junio C Hamano
parent
commit
e8bb4b38df
  1. 2
      gitweb/gitweb.perl

2
gitweb/gitweb.perl

@ -828,7 +828,7 @@ if (!defined $action) { @@ -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");
}

Loading…
Cancel
Save