]> dgit.raspbian.org Git - git-annex.git/commitdiff
avoid using MatchingKey where MatchingFile can be used now
authorJoey Hess <joeyh@joeyh.name>
Mon, 14 Dec 2020 21:54:25 +0000 (17:54 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 14 Dec 2020 21:54:25 +0000 (17:54 -0400)
This is actually matching worktree files, and now that a Key can be
provided along with the file when doing that, using MatchingFile
reflects that.

CmdLine/Seek.hs
Types/FileMatcher.hs

index 6faea40119f6849b17bd1986934888e2b97bed34..25d46f02e25dc394b388b69bb63ec800756f8da6 100644 (file)
@@ -346,7 +346,7 @@ seekFilteredKeys seeker listfs = do
                        maybe noop (Annex.BranchState.setCache logf) logcontent
                        checkMatcherWhen mi
                                (matcherNeedsLocationLog mi && not (matcherNeedsFileName mi))
-                               (MatchingKey k (AssociatedFile (Just f)))
+                               (MatchingFile $ FileInfo (Just f) f (Just k))
                                (commandAction $ startAction seeker si f k)
                        precachefinisher mi lreader
                Nothing -> return ()
@@ -373,7 +373,7 @@ seekFilteredKeys seeker listfs = do
                case parseLinkTargetOrPointerLazy =<< content of
                        Just k -> checkMatcherWhen mi
                                (matcherNeedsKey mi && not (matcherNeedsFileName mi || matcherNeedsLocationLog mi))
-                               (MatchingKey k (AssociatedFile (Just f)))
+                               (MatchingFile $ FileInfo (Just f) f (Just k))
                                (checkpresence k (a k))
                        Nothing -> noop
        
index 3b5adca1def95a4818d5b725ff10b0abc3f9c6b0..2b8811d7436c680d02245d6785d6dedbd18abcf0 100644 (file)
@@ -22,7 +22,7 @@ import qualified Data.Set as S
 data MatchInfo
        = MatchingFile FileInfo
        | MatchingKey Key AssociatedFile
-       -- ^ This is used when operating on a file that may be in another
+       -- ^ This is used when matching a file that may be in another
        -- branch. The AssociatedFile is the filename, but it should not be
        -- accessed from disk when matching.
        | MatchingInfo ProvidedInfo