From 61ddc300c1ee8d1f7f48905e4d299fa8d88fcfaf Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Thu, 14 Aug 2025 10:32:35 -0400 Subject: [PATCH] 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. --- find-files.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/find-files.nix b/find-files.nix index e52fc06..dc8d5e5 100644 --- a/find-files.nix +++ b/find-files.nix @@ -242,7 +242,10 @@ rec { for (guard (toLower section == "core" && toLower key == "excludesfile")) (_: - resolveFile (home /.) value + # 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. + resolveFile (home /.) (builtins.unsafeDiscardStringContext value) ) ) );