diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2017-09-28 15:17:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-28 15:17:25 +0200 |
commit | 58998fb2dd6a1cad5faffdc36ae536ee6b04e3d2 (patch) | |
tree | 4f5c342b1c20b23a5bc73eb74855c4bb81f2c197 /git/remote.py | |
parent | 251128d41cdf39a49468ed5d997cc1640339ccbc (diff) | |
parent | 2af601d5800a39ab04e9fe6cf22ef7b917ab5d67 (diff) | |
download | gitpython-58998fb2dd6a1cad5faffdc36ae536ee6b04e3d2.tar.gz |
Merge branch 'master' into master
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git/remote.py b/git/remote.py index fd76e592..81719f4b 100644 --- a/git/remote.py +++ b/git/remote.py @@ -38,6 +38,7 @@ from .refs import ( log = logging.getLogger('git.remote') +log.addHandler(logging.NullHandler()) __all__ = ('RemoteProgress', 'PushInfo', 'FetchInfo', 'Remote') @@ -208,7 +209,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(r'^\s*(.) (\[?[\w\s\.$@]+\]?)\s+(.+) -> ([^\s]+)( \(.*\)?$)?') + _re_fetch_result = re.compile(r'^\s*(.) (\[?[\w\s\.$@]+\]?)\s+(.+) -> ([^\s]+)( \(.*\)?$)?') _flag_map = {'!': ERROR, '+': FORCED_UPDATE, @@ -263,7 +264,7 @@ class FetchInfo(object): fetch line is the corresponding line from FETCH_HEAD, like acb0fa8b94ef421ad60c8507b634759a472cd56c not-for-merge branch '0.1.7RC' of /tmp/tmpya0vairemote_repo""" - match = cls.re_fetch_result.match(line) + match = cls._re_fetch_result.match(line) if match is None: raise ValueError("Failed to parse line: %r" % line) @@ -652,7 +653,7 @@ class Remote(LazyMixin, Iterable): continue # read head information - with open(osp.join(self.repo.git_dir, 'FETCH_HEAD'), 'rb') as fp: + with open(osp.join(self.repo.common_dir, 'FETCH_HEAD'), 'rb') as fp: fetch_head_info = [l.decode(defenc) for l in fp.readlines()] l_fil = len(fetch_info_lines) |