gitignoreFilter: don't use $path/.gitignore, only $path/../.gitignore

This commit is contained in:
Robert Hensing 2019-09-06 12:35:11 +02:00
parent f8d5bdfe76
commit cc23ac9d19

View file

@ -24,9 +24,9 @@ rec {
basePathStr = toString basePath;
in
path: type: let
localPath = removePrefix basePathStr (toString path);
localPathElements = splitString "/" localPath;
in parse-gitignore.runFilterPattern' (getPatterns patternsBelowP localPathElements)."/patterns" path type;
localDirPath = removePrefix basePathStr (toString (dirOf path));
localDirPathElements = splitString "/" localDirPath;
in parse-gitignore.runFilterPattern' (getPatterns patternsBelowP localDirPathElements)."/patterns" path type;
getPatterns =
patternTree: pathElems: