Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit f728f60

Browse files
committed
Fix regex pattern in QUICK_MANIFEST_REGEX to correctly escape wildcard characters
1 parent eafe68d commit f728f60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git/pkgs/analyzer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Analyzer
4646
QUICK_MANIFEST_REGEX = Regexp.union(
4747
QUICK_MANIFEST_PATTERNS.map do |pattern|
4848
if pattern.include?('*')
49-
Regexp.new(pattern.gsub('.', '\\.').gsub('*', '.*'))
49+
Regexp.new(Regexp.escape(pattern).gsub('\\*', '.*'))
5050
else
5151
/(?:^|\/)#{Regexp.escape(pattern)}$/
5252
end

0 commit comments

Comments
 (0)