Skip to content

Commit 88c388a

Browse files
committed
fix: use matchDotsImplicitly for Glob too
This means that matching on labels, branches, or authors (its current uses) will still match values that begin with dot, rather than treating them like "hidden" files, not to be matched.
1 parent f29faab commit 88c388a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Restyler/Config/Glob.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import Data.Aeson
2424
import Restyler.Monad.Directory
2525
import System.FilePath ((</>))
2626
import System.FilePath.Glob hiding (match)
27-
import System.FilePath.Glob qualified as Glob
2827

2928
newtype Glob a = Glob {unwrap :: String}
3029
deriving stock (Eq)
@@ -49,7 +48,11 @@ instance GlobTarget Text where
4948
}
5049

5150
match :: forall a. GlobTarget a => Glob a -> a -> Bool
52-
match (Glob p) = Glob.match (compileWith (getCompOptions @a) p) . forMatch
51+
match (Glob p) =
52+
matchWith
53+
(matchDefault {matchDotsImplicitly = True})
54+
(compileWith (getCompOptions @a) p)
55+
. forMatch
5356

5457
matchAny :: (Foldable t, GlobTarget a) => [Glob a] -> t a -> Bool
5558
matchAny globs = any $ \x -> any (`match` x) globs

0 commit comments

Comments
 (0)