1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-31 22:37:54 +01:00

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>
This commit is contained in:
Jakub Narebski 2009-05-11 19:39:43 +02:00 committed by Junio C Hamano
parent 3278fbc5ce
commit e8bb4b38df

View file

@ -828,7 +828,7 @@ sub evaluate_path_info {
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");
}