Merge branch 'ms/subtree-fixlets'
[gitweb.git] / perl / Git / SVN / GlobSpec.pm
index 96cfd9896e99f7060ab69e76675f976a1f8ffdc7..c95f5d76cae9fc40a1c1d2e6cff899e81186b6ca 100644 (file)
@@ -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;