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.
This commit is contained in:
Taeer Bar-Yam 2025-08-18 11:40:13 -04:00
parent 61ddc300c1
commit 81c6af2553

View file

@ -242,9 +242,11 @@ rec {
for
(guard (toLower section == "core" && toLower key == "excludesfile"))
(_:
# SAFETY: Ultimately this path will get passed into
# `builtins.readFile`, which ignores the context anyways. The
# context is only relevant if it becomes part of a derivation.
# Paths with context can't be appended to other paths, so we have to
# remove the context here.
# SAFETY: gitignore.nix is not responsible for making sure the
# store paths pointed to in your global git config have been
# realised.
resolveFile (home /.) (builtins.unsafeDiscardStringContext value)
)
)