remove unused contentFile = Nothing

This commit is contained in:
Joey Hess 2021-03-01 16:34:40 -04:00
parent 25e4ab7e81
commit ee4fd38ecf
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 32 additions and 40 deletions

View file

@ -171,7 +171,7 @@ start o si file addunlockedmatcher = do
perform :: AddOptions -> RawFilePath -> AddUnlockedMatcher -> CommandPerform
perform o file addunlockedmatcher = withOtherTmp $ \tmpdir -> do
lockingfile <- not <$> addUnlocked addunlockedmatcher
(MatchingFile (FileInfo (Just file) file Nothing))
(MatchingFile (FileInfo file file Nothing))
True
let cfg = LockDownConfig
{ lockingFile = lockingfile

View file

@ -239,7 +239,7 @@ startLocal o addunlockedmatcher largematcher mode (srcfile, destfile) =
stop
lockdown a = do
let mi = MatchingFile $ FileInfo
{ contentFile = Just srcfile
{ contentFile = srcfile
, matchFile = destfile
, matchKey = Nothing
}

View file

@ -569,7 +569,7 @@ getDirStatInfo o dir = do
where
initial = (emptyKeyInfo, emptyKeyInfo, emptyNumCopiesStats, M.empty)
update matcher fast key file vs@(presentdata, referenceddata, numcopiesstats, repodata) =
ifM (matcher $ MatchingFile $ FileInfo (Just file) file (Just key))
ifM (matcher $ MatchingFile $ FileInfo file file (Just key))
( do
!presentdata' <- ifM (inAnnex key)
( return $ addKey key presentdata

View file

@ -135,7 +135,7 @@ send ups fs = do
(fs', cleanup) <- seekHelper id ww LsFiles.inRepo
=<< workTreeItems ww fs
matcher <- Limit.getMatcher
let addlist f o = whenM (matcher $ MatchingFile $ FileInfo (Just f) f Nothing) $
let addlist f o = whenM (matcher $ MatchingFile $ FileInfo f f Nothing) $
liftIO $ hPutStrLn h o
forM_ fs' $ \(_, f) -> do
mk <- lookupKey f