Skip to content

Commit e8bb4b3

Browse files
jnarebgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3278fbc commit e8bb4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ sub evaluate_path_info {
828828
if (!defined($actions{$action})) {
829829
die_error(400, "Unknown action");
830830
}
831-
if ($action !~ m/^(opml|project_list|project_index)$/ &&
831+
if ($action !~ m/^(?:opml|project_list|project_index)$/ &&
832832
!$project) {
833833
die_error(400, "Project needed");
834834
}

0 commit comments

Comments
 (0)