Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitignore added to places it should not #1862

Closed
stefanholek opened this issue Jun 16, 2020 · 2 comments · Fixed by #1866
Closed

.gitignore added to places it should not #1862

stefanholek opened this issue Jun 16, 2020 · 2 comments · Fixed by #1866
Labels

Comments

@stefanholek
Copy link

Refs #1806

Virtualenv now drops a .gitignore file. While I understand where you are coming from, it is a mistake to assume virtualenv owns the target directory. For example, I and many people I work with typically do this:

git clone git@github.com:stefanholek/foo
cd foo
virtualenv .
./bin/pip install -e .
./bin/python -m unittest

Recent versions of virtualenv add a .gitignore file into my sandbox. To make matters worse it even overwrites an existing .gitignore file! This is very clearly wrong.

I suggest to not write the .gitignore file unless virtualenv has created the target directory, or at least don't write it if the target directory already contains a .git directory and/or a .gitignore file.

Thanks!

@gaborbernat
Copy link
Contributor

don't write it if the target directory already contains a .git directory and/or a .gitignore file.

I think this makes sense as an improvement.

@gaborbernat
Copy link
Contributor

This now has been released under https://virtualenv.pypa.io/en/20.0.24/changelog.html#v20-0-24-2020-06-22

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants