summaryrefslogtreecommitdiff
path: root/perl/Git/SVN/GlobSpec.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Git/SVN/GlobSpec.pm')
-rw-r--r--perl/Git/SVN/GlobSpec.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl/Git/SVN/GlobSpec.pm b/perl/Git/SVN/GlobSpec.pm
index 96cfd9896e..c95f5d76ca 100644
--- a/perl/Git/SVN/GlobSpec.pm
+++ b/perl/Git/SVN/GlobSpec.pm
@@ -44,7 +44,9 @@ sub new {
my $right = join('/', @right);
$re = join('/', @patterns);
$re = join('\/',
- grep(length, quotemeta($left), "($re)", quotemeta($right)));
+ grep(length, quotemeta($left),
+ "($re)(?=/|\$)",
+ quotemeta($right)));
my $left_re = qr/^\/\Q$left\E(\/|$)/;
bless { left => $left, right => $right, left_regex => $left_re,
regex => qr/$re/, glob => $glob, depth => $depth }, $class;