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

Potential bug on import git #930

Open
pared opened this issue Sep 30, 2019 · 1 comment
Open

Potential bug on import git #930

pared opened this issue Sep 30, 2019 · 1 comment

Comments

@pared
Copy link
Contributor

pared commented Sep 30, 2019

On import git GitPython calls git 2 times, upon running refresh method.
Those calls have potential of being a bug source since the user has no way of providing environmental variables for git. For example, if the user decides to provide the PATH variable for any method utilizing the env variable (eg clone_from), he/she might end up using different git than has been used during import.

@Byron
Copy link
Member

Byron commented Sep 30, 2019

Absolutely true, it is impossible to control the environment for these git calls.
A potential workaround for this case would be to configure the environment of the python process to be the 'best fit for most cases', even though this might still not be enough.

Maybe it's possible to alter the python global env dict prior to importing GitPython, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants