anchor.diff:        str_patterns = map (onPath readFile) (lib.toList file_str_patterns);
       in concatStringsSep "\n" str_patterns;
   
  -  gitignoreFilterPure = filter: patterns: root: let
  -    compiledFilter = gitignoreCompileIgnore patterns root;
  -    filterFn = gitignoreFilter compiledFilter;
  -  in name: type: filterFn root name type && filter name type;
  +  gitignoreFilterPure = filter: patterns: root: name: type:
  +    gitignoreFilter (gitignoreCompileIgnore patterns root) root name type
  +    && filter name type;
   
     # This is a very hacky way of programming this!
     # A better way would be to reuse existing filtering by making multiple gitignore functions per each root.
  
positive.code:       (filter (l: !isList l && !isComment l)
        (split "\n" gitignore));
  
    gitignoreFilter = ign: let
      patterns = gitignoreToPatterns ign;
    in root: filterPattern patterns root;
  
    # string|[string|file] (→ [string|file] → [string]) -> string
    gitignoreCompileIgnore = file_str_patterns: root:
  
negative.code: in rec {
    # [["good/relative/source/file" true] ["bad.tmpfile" false]] -> root -> path
    filterPattern = patterns: root:
      (name: _type:
        let
          relPath = lib.removePrefix ((toString root) + "/") name;
          matches = pair: (match (head pair) relPath) != null;
          matched = map (pair: [(matches pair) (last pair)]) patterns;
        in
          last (last ([[true true]] ++ (filter head matched)))
      );
  
    # string -> [[regex bool]]
    gitignoreToPatterns = gitignore:
  