Clarify why GIT_PYTHON_GIT_EXECUTABLE may be set on failure by EliahKagan · Pull Request #1810 · gitpython-developers/GitPython

@EliahKagan mentioned this pull request

Jan 24, 2024

@EliahKagan

This clarifies the comment that explains the significance of
setting the Git.GIT_PYTHON_GIT_EXECUTABLE attribute when running
Git failed but the attribute wasn't set before.

This happens in the code path in Git.refresh where has_git is False
and old_git is None, provided the refresh mode doesn't call for the
initial refresh to raise an exception on failure.

It was previously described in terms of a "first" and "second"
import, but as discussed in gitpython-developers#1804, the rationale and effect were
not altogether clear.

@EliahKagan EliahKagan changed the title Clarify why an initial failing git command can be set Clarify why GIT_PYTHON_GIT_EXECUTABLE may be set on failure

Jan 24, 2024

@Byron

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Jan 25, 2024
I think this refactoring slightly improves clarity.

+ Condense/sort/group imports (while adding contextlib import).

+ Minor readability/style tweaks in FetchInfo.refresh comments.

+ Make a comment in Git.refresh clearer, building on revisions in:
  gitpython-developers#1810 (comment)

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Jan 25, 2024
I think this refactoring slightly improves readability.

+ Condense/sort/group imports (while adding contextlib import).

+ Minor style tweaks in FetchInfo.refresh comments.

+ Make a comment in Git.refresh clearer, building on revisions in:
  gitpython-developers#1810 (comment)

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Jan 25, 2024
I think this refactoring slightly improves readability.

+ Condense/sort/group imports (while adding contextlib import).

+ Minor style tweaks in FetchInfo.refresh comments.

+ Make a comment in Git.refresh clearer, building on revisions in:
  gitpython-developers#1810 (comment)

lettuce-bot bot referenced this pull request in lettuce-financial/github-bot-signed-commit

Feb 15, 2024

renovate bot referenced this pull request in allenporter/flux-local

Feb 16, 2024