]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Use capturing parentheses only when you intend to capture
authorJakub Narebski <redacted>
Mon, 11 May 2009 17:39:43 +0000 (19:39 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 0997eb8d25514ea4d827656e8ea385ba9a23f3b134a0ca9ed3fca5095228d023..80475c218436f8583c50f00128df19999d4bd82393710cd2aad623d803d192ab 100755 (executable)
@@ -829,7 +829,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");
 }
This page took 0.246093 seconds and 4 git commands to generate.