From 5e02afbb7343a7a4e07e3dcf8b845ea2764d927c Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 14 Jun 2016 07:51:25 +0200 Subject: Fix for parsing non-ASCII chars in status lines --- doc/source/changes.rst | 2 ++ git/remote.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/source/changes.rst b/doc/source/changes.rst index 3f5b8c50..9efbc0f0 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -5,6 +5,8 @@ Changelog 2.0.6 - Fixes and Features ========================== +* Fix: remote output parser now correctly matches refs with non-ASCII + chars in them * Fix: TypeError about passing keyword argument to string decode() on Python 2.6. * Feature: `setUrl API on Remotes `_ diff --git a/git/remote.py b/git/remote.py index 75a6875f..9a26deeb 100644 --- a/git/remote.py +++ b/git/remote.py @@ -203,7 +203,7 @@ class FetchInfo(object): NEW_TAG, NEW_HEAD, HEAD_UPTODATE, TAG_UPDATE, REJECTED, FORCED_UPDATE, \ FAST_FORWARD, ERROR = [1 << x for x in range(8)] - re_fetch_result = re.compile("^\s*(.) (\[?[\w\s\.$@]+\]?)\s+(.+) -> ([/\w_\+\.\-$@#()]+)( \(.*\)?$)?") + re_fetch_result = re.compile('^\s*(.) (\[?[\w\s\.$@]+\]?)\s+(.+) -> ([^\s]+)( \(.*\)?$)?') _flag_map = {'!': ERROR, '+': FORCED_UPDATE, -- cgit v1.2.1