summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2017-09-28 15:13:15 +0200
committerGitHub <noreply@github.com>2017-09-28 15:13:15 +0200
commita56136f9cb48a17ae15b59ae0f3f99d9303b1cb1 (patch)
treeecb856bea6ed63e9c2baf8365a4e0a9030b0b3a3 /git/remote.py
parent90dc03da3ebe1daafd7f39d1255565b5c07757cb (diff)
parent2af601d5800a39ab04e9fe6cf22ef7b917ab5d67 (diff)
downloadgitpython-a56136f9cb48a17ae15b59ae0f3f99d9303b1cb1.tar.gz
Merge branch 'master' into adding_setup_for_git_executable
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 39b72249..7261be81 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,
@@ -284,7 +285,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)
@@ -673,7 +674,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)