Skip to content

Commit

Permalink
Merge pull request #1810 from EliahKagan/refresh
Browse files Browse the repository at this point in the history
Clarify why GIT_PYTHON_GIT_EXECUTABLE may be set on failure
  • Loading branch information
Byron authored Jan 24, 2024
2 parents 867305d + 82cbc6c commit 307f198
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,10 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool:
)
raise ImportError(err)

# We get here if this was the init refresh and the refresh mode was not
# error. Go ahead and set the GIT_PYTHON_GIT_EXECUTABLE such that we
# discern the difference between a first import and a second import.
# We get here if this was the initial refresh and the refresh mode was
# not error. Go ahead and set the GIT_PYTHON_GIT_EXECUTABLE such that we
# discern the difference between the first refresh at import time
# and subsequent calls to refresh().
cls.GIT_PYTHON_GIT_EXECUTABLE = cls.git_exec_name
else:
# After the first refresh (when GIT_PYTHON_GIT_EXECUTABLE is no longer
Expand Down

0 comments on commit 307f198

Please sign in to comment.