summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2009-05-11 17:39:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-13 17:34:11 (GMT)
commite8bb4b38dfcbd5ff02ceb5e925d53c1460887df5 (patch)
treef3606bb784bee2b00bdac46d5155d07603f798b5 /gitweb/gitweb.perl
parent3278fbc5ce39e0f7bf095ce99912dccbc347b4d7 (diff)
downloadgit-e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5.zip
git-e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5.tar.gz
git-e8bb4b38dfcbd5ff02ceb5e925d53c1460887df5.tar.bz2
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-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index beb79ee..097bd18 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");
}