summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py7
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)