diff options
author | Joey Hess <joeyh@joeyh.name> | 2020-09-24 15:12:09 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2020-09-24 15:12:09 -0400 |
commit | d89984b121745fdd7a704f0468d466c6e08f99c1 (patch) | |
tree | 78cb6cb85210eb0b4a467aebd14e1f63a6d4b6d8 /Types/FileMatcher.hs | |
parent | b45b37b088e7b7aef847e40b4b4ae6a417926efd (diff) |
sync --all avoid unncessary first pass
Sped up seeking to around twice as fast, by avoiding a pass over the
worktree files when preferred content expressions of the local repo and
remotes don't use include=/exclude=.
Thanks to Lukey for identifying the optimisation.
This commit was sponsored by Brock Spratlen on Patreon.
Diffstat (limited to 'Types/FileMatcher.hs')
-rw-r--r-- | Types/FileMatcher.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Types/FileMatcher.hs b/Types/FileMatcher.hs index 8b5558f0e0..8a56a67ac7 100644 --- a/Types/FileMatcher.hs +++ b/Types/FileMatcher.hs @@ -57,8 +57,11 @@ type AssumeNotPresent = S.Set UUID data MatchFiles a = MatchFiles { matchAction :: AssumeNotPresent -> MatchInfo -> a Bool + , matchNeedsFileName :: Bool + -- ^ does the matchAction need a filename in order to match? , matchNeedsFileContent :: Bool - -- ^ does the matchAction need the file content to be present? + -- ^ does the matchAction need the file content to be present in + -- order to succeed? } type FileMatcher a = Matcher (MatchFiles a) |