diff --git a/news/10361.trivial.rst b/news/10361.trivial.rst new file mode 100644 index 00000000000..05b3cb10fde --- /dev/null +++ b/news/10361.trivial.rst @@ -0,0 +1 @@ +Added an explicit warning when pip is unable to parse git version. diff --git a/src/pip/_internal/vcs/git.py b/src/pip/_internal/vcs/git.py index 3186553e705..7a78ad12dd5 100644 --- a/src/pip/_internal/vcs/git.py +++ b/src/pip/_internal/vcs/git.py @@ -94,6 +94,7 @@ def get_git_version(self) -> Tuple[int, ...]: version = self.run_command(["version"], show_stdout=False, stdout_only=True) match = GIT_VERSION_REGEX.match(version) if not match: + logger.warning("Can't parse git version: %s", version) return () return tuple(int(c) for c in match.groups())