◐ Shell
clean mode source ↗

Updating regex pattern to handle unicode whitespaces. by jcole-crowdstrike · Pull Request #1853 · gitpython-developers/GitPython

Expand Up @@ -325,7 +325,7 @@ class FetchInfo(IterableObj): ERROR, ) = [1 << x for x in range(8)]
_re_fetch_result = re.compile(r"^\s*(.) (\[[\w\s\.$@]+\]|[\w\.$@]+)\s+(.+) -> ([^\s]+)( \(.*\)?$)?") _re_fetch_result = re.compile(r"^ *(.) (\[[\w \.$@]+\]|[\w\.$@]+) +(.+) -> ([^ ]+)( \(.*\)?$)?")
_flag_map: Dict[flagKeyLiteral, int] = { "!": ERROR, Expand Down Expand Up @@ -891,7 +891,7 @@ def _get_fetch_info_from_stderr( None, progress_handler, finalizer=None, decode_streams=False, decode_streams=True, kill_after_timeout=kill_after_timeout, )
Expand Down Expand Up @@ -1068,7 +1068,7 @@ def fetch( Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=self.unsafe_git_fetch_options)
proc = self.repo.git.fetch( "--", self, *args, as_process=True, with_stdout=False, universal_newlines=True, v=verbose, **kwargs "--", self, *args, as_process=True, with_stdout=False, universal_newlines=False, v=verbose, **kwargs ) res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout) if hasattr(self.repo.odb, "update_cache"): Expand Down Expand Up @@ -1122,7 +1122,7 @@ def pull( Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=self.unsafe_git_pull_options)
proc = self.repo.git.pull( "--", self, refspec, with_stdout=False, as_process=True, universal_newlines=True, v=True, **kwargs "--", self, refspec, with_stdout=False, as_process=True, universal_newlines=False, v=True, **kwargs ) res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout) if hasattr(self.repo.odb, "update_cache"): Expand Down