allow matching on files whose content is not present
Anything that needs to examine the file content will fail to match, or fall back to other available information. But the intent is that the matcher be checked for matchNeedsFileContent and only be used if it does not, so the exact behavior doesn't much matter as it should never happen. The real point of this is to not need to provide a dummy content file when matching. This commit was sponsored by Martin D on Patreon.
This commit is contained in:
parent
9e676f062f
commit
00dbe35fbc
11 changed files with 40 additions and 30 deletions
|
@ -133,7 +133,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 f f) $
|
||||
let addlist f o = whenM (matcher $ MatchingFile $ FileInfo (Just f) f) $
|
||||
liftIO $ hPutStrLn h o
|
||||
forM_ fs' $ \(_, f) -> do
|
||||
mk <- lookupKey f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue