Commit graph

24 commits

Author SHA1 Message Date
Robert Hensing
ef91937276 Fix guardNonEmptyString
One of the simplest mistakes.
I use more TDD nowadays...
2025-11-10 21:28:14 +01:00
Taeer Bar-Yam
81c6af2553 fix comment
It turns out readFile does realise the context, so it could make a
difference. I would still argue that's not our responsibility and your
git config should be pointing ot paths that are already valid.
2025-08-18 11:40:13 -04:00
Taeer Bar-Yam
61ddc300c1 discard string context of git config's core.excludesFile
Before this change, any store path in your git config would become part
of the string context of any of the parsed strings, and then prevent us
from appending it to a path.

Upon further reflection, we don't care even if core.excludesFile is a
store path itself, so we can unconditionally throw away the string
context.
2025-08-14 10:32:35 -04:00
Robert Hensing
b5594318e5 Fix dir with ignored contents bug 2023-09-07 16:58:51 +02:00
Robert Hensing
fad6033fca Add extraRules to gitignoreFilterWith 2022-07-21 13:24:10 +02:00
Robert Hensing
e42bb748f3 Disable globalIgnores when in pure mode 2022-07-21 12:49:22 +02:00
Alex Wied
cbafce8465
Update find-files.nix
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-07-13 05:18:32 -04:00
Alex Wied
f0e98c8e42 Add support for pure evaluation mode 2022-07-13 02:45:57 -04:00
Robert Hensing
998b4b7318 Add *With functions to allow for more parameters 2021-10-25 14:23:03 +02:00
Lennart Spitzner
97d5366529 Make git config lookups case insensitive 2020-06-05 19:09:57 +02:00
Robert Hensing
5196a46030 Remove guardProperFile and doc the readDir problem 2019-11-28 16:21:51 +01:00
Robert Hensing
f4c201667c Hope for sane setups when checking files 2019-11-22 23:21:12 +01:00
Robert Hensing
bf4d43602f Fix XDG_ env var handling 2019-11-22 23:19:16 +01:00
Robert Hensing
a422a9797a Elaborate null vs unknown .git node type 2019-11-22 23:03:22 +01:00
Robert Hensing
de0767e90e Prevent a readDir via pathExists 2019-11-22 22:57:21 +01:00
Robert Hensing
526e3b37e3 Polish 2019-11-22 22:57:21 +01:00
Robert Hensing
1d5aec50c1 Fix type mistake
I even wrote out the type, but didn't check the call site.
Types types types types types
2019-09-18 14:57:23 +02:00
Robert Hensing
d1000280fa
Update find-files.nix
Co-Authored-By: Domen Kožar <domen@dev.si>
2019-09-18 14:11:23 +02:00
Robert Hensing
0bd9291f56 Don't readDir the store 2019-09-18 13:29:40 +02:00
Robert Hensing
7f3958bb32 Ignore empty directories
Fixes #12
2019-09-17 14:01:35 +02:00
Robert Hensing
05026b6bf5 Refactor rules.nix
Make it centered around
type patternFunction = path -> type -> nullOr bool

instead of
path -> type -> [(bool, bool)]
of which only the last match (fst?) was used (snd?).
2019-09-06 21:17:54 +02:00
Robert Hensing
cc23ac9d19 gitignoreFilter: don't use $path/.gitignore, only $path/../.gitignore 2019-09-06 12:37:47 +02:00
Robert Hensing
f8d5bdfe76 Refactor
Extract getPatterns variable in gitignoreFilter to top-level
2019-09-06 12:30:48 +02:00
Robert Hensing
bcc385e399 Add IFD-free gitignoreSource implementation 2019-05-12 13:48:32 +02:00