zdave / openconnect-gp-okta

OpenConnect wrapper which logs into a GlobalProtect gateway, authenticating with Okta
37 stars 27 forks source link

Add gitignore for ignoring venv files #6

Closed googol closed 3 years ago

zdave commented 3 years ago

Not sure about this one. There is no standard in-tree location for the virtualenv directory. Ignoring specific files within the virtualenv directory doesn't seem right as those may change and unless the list is complete it won't work. In particular with python3 -m venv venv this change doesn't hide the venv directory for me, presumably because there are extra files in there not covered by this.

googol commented 3 years ago

I generated this by listing the files I was seeing as untracked after running exactly that command to set up venv. I'll check if I have the venv dir in my global gitignore maybe

googol commented 3 years ago

Remembered about this PR again and played around with it. So with this gitignore it doesn't matter what the venv directory is, whether it's the repository root directory itself, venv, or foo/bar, the files in it will be ignored with this gitignore.

I did add the include/ directory to the gitignore from the previous review, it happened to be empty in my venv but it's probably best to ignore it anyways

zdave commented 3 years ago

If you're generating your virtualenv directory inside the git repo I think the right way to get it ignored by git is to add a .gitignore inside it containing just * or something like that. Even with a more complete list that covers all the files I'm seeing in my virtualenv directory, I don't think this is the right approach, for the reasons I gave earlier.

googol commented 3 years ago

ok I'll work out a solution for myself then!