improve readability and fix a warning
authorJoey Hess <joeyh@joeyh.name>
Mon, 14 Dec 2020 21:48:30 +0000 (17:48 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 14 Dec 2020 21:48:30 +0000 (17:48 -0400)
Annex/FileMatcher.hs

index e2128f2ee1a240658a9e18b6999516dfa7615f04..bcde9ba4a858b73644d9ff9ca301c298206ea19c 100644 (file)
@@ -72,10 +72,11 @@ checkMatcher :: FileMatcher Annex -> Maybe Key -> AssociatedFile -> AssumeNotPre
 checkMatcher matcher mkey afile notpresent notconfigured d
        | isEmpty matcher = notconfigured
        | otherwise = case (mkey, afile) of
-               (mkey, AssociatedFile (Just file)) ->
+               (_, AssociatedFile (Just file)) ->
                        go =<< fileMatchInfo file mkey
-               (Just key, _) -> go (MatchingKey key afile)
-               _ -> d
+               (Just key, AssociatedFile Nothing) ->
+                       go (MatchingKey key afile)
+               (Nothing, _) -> d
   where
        go mi = checkMatcher' matcher mi notpresent