improve readability and fix a warning

This commit is contained in:
Joey Hess 2020-12-14 17:48:30 -04:00
parent 8b248d84fb
commit 9de5506f19
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View 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