diff options
author | Jakub Narebski <jnareb@gmail.com> | 2009-05-11 19:39:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-13 10:34:11 -0700 |
commit | e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5 (patch) | |
tree | f3606bb784bee2b00bdac46d5155d07603f798b5 /gitweb | |
parent | 3278fbc5ce39e0f7bf095ce99912dccbc347b4d7 (diff) | |
download | git-e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5.tar.gz git-e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5.tar.xz |
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')
-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 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"); } |