From 35aeebc99547d621e6288ef8b9e0c91a1f1116b5 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 1 Aug 2024 20:14:21 +0200 Subject: Add comment for why pre-commit needs gitconfig --- poetry_restrict_plugin/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/poetry_restrict_plugin/plugin.py b/poetry_restrict_plugin/plugin.py index 2aab1c9..c885795 100644 --- a/poetry_restrict_plugin/plugin.py +++ b/poetry_restrict_plugin/plugin.py @@ -88,6 +88,8 @@ class RestrictPlugin(Plugin): pre_commit_cache = os.path.expanduser("~/.cache/pre-commit") if os.path.exists(pre_commit_cache): ruleset.allow(pre_commit_cache) + # pre-commit runs git to figure out the diff to lint, which will + # be pretty noisy if we do not whitelist the gitconfig. ruleset.allow( *existing_paths( ( -- cgit v1.2.3