diff options
author | Jakub Narebski <jnareb@gmail.com> | 2009-05-11 21:39:43 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-13 21:34:11 +0400 |
commit | e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5 (patch) | |
tree | f3606bb784bee2b00bdac46d5155d07603f798b5 /gitweb/gitweb.perl | |
parent | 3278fbc5ce39e0f7bf095ce99912dccbc347b4d7 (diff) |
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>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index beb79eebd5..097bd18be5 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"); } |