.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 f0160baa7a (".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 f0160baa7a
This commit is contained in:
Yueh-Shun Li 2024-07-13 05:06:37 +08:00
parent c171878653
commit fe656cbe32

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ tags
/doc/manual.pdf /doc/manual.pdf
/source/ /source/
.version-suffix .version-suffix
.direnv
.DS_Store .DS_Store
.mypy_cache .mypy_cache