You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ Test a successful refresh with a relative path, which will be
safer to do once the refresh tests restore changed state.
This is incomplete, because while it is probably not necessary
while running the test suite to preserve an old False value of
git.GIT_OK (most tests can't work if that happens anyway), the
value of Git.GIT_PYTHON_GIT_EXECUTABLE is not the only other global
state that effects the behavior of subsequently run tests and that
may be changed as a result of the refresh tests.
1. After the git.refresh function calls git.cmd.Git.refresh, it
calls git.remote.FetchInfo.refresh, which rebinds the
git.remote.FetchInfo._flag_map attribute.
2. Future changes to git.cmd.Git.refresh may mutate other state in
the Git class, and ideally the coupling would be loose enough
that the refresh tests wouldn't have to be updated for that if
the behavior being tested does not change.
3. Future changes to git.refresh may perform other refreshing
actions, and ideally it would be easy (and obvious) what has to
be done to patch it back. In particular, it will likely call
another Git method that mutates class-wide state due to gitpython-developers#1791,
and for such state that is also of the Git class, ideally no
further changes would have to be made to the code that restores
state after the refresh tests.
If we assume git.refresh is working at least in the case that it is
called with no arguments, then the cleanup can just be a call to
git.refresh(). Otherwise, sufficiently general cleanup may be more
complicated.
0 commit comments