From fe656cbe321651ab51215197e9174594c5a2ea06 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 13 Jul 2024 05:06:37 +0800 Subject: [PATCH] .gitignore: ignore .direnv Add a rule to .gitignore to exclude .direnv, the name of the temporary directory created by direnv, from the source tree. Commit f0160baa7af8 (".envrc: init for new shell.nix") is introduced to the "master" branch, invoking an official .envrc direnv configuration when a developer enters the Nixpkgs source directory. When checking out the stable-release branches, the rule to exclude the temporary directory .direnv got lost from .gitignore, and the temporary directory became visible to source control, creating a risk of polluting the source tree. This patch backports the .gitignore rule against .direnv to the stable release branch and eliminates such risk of pollution. Even though the necessity of .envrc inside the source tree is under debate, the opinions from both sides support the non-negligible use of direct as a developer tool by Nixpkgs contributors, and it would be beneficial to have a .gitignore rule to exclude the corresponding temporary files whether we have an official .envrc or not. Partially backport f0160baa7af871ec9fed4e9ec6758104e6c8e0a0 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2753c9073832..db5517cfde91 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ tags /doc/manual.pdf /source/ .version-suffix +.direnv .DS_Store .mypy_cache