Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: Use capturing parentheses only when you intend to capture
author
Jakub Narebski
<jnareb@gmail.com>
Mon, 11 May 2009 17:39:43 +0000
(19:39 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 13 May 2009 17:34:11 +0000
(10:34 -0700)
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>
gitweb/gitweb.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
3278fbc
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index beb79eebd5c1bba2fdb57445c0f674e277524a6e..097bd18be5de0b52eed7c879e6bdfb3968143712 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-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");
}