summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/changes.rst6
-rw-r--r--git/refs/symbolic.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/doc/source/changes.rst b/doc/source/changes.rst
index 539f9a3d..4aa55275 100644
--- a/doc/source/changes.rst
+++ b/doc/source/changes.rst
@@ -8,6 +8,12 @@ Unreleased
* Restricted GitDB (gitdb2) version requirement to < 4
* Removed old nose library from test requirements
+Bugfixes
+--------
+
+* Changed to use UTF-8 instead of default encoding when getting information about a symbolic reference
+ (`#774 <https://github.com/gitpython-developers/GitPython/issues/774>`_)
+
3.0.8
=====
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 4784197c..aa449528 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -142,7 +142,7 @@ class SymbolicReference(object):
tokens = None
repodir = _git_dir(repo, ref_path)
try:
- with open(osp.join(repodir, ref_path), 'rt') as fp:
+ with open(osp.join(repodir, ref_path), 'rt', encoding='UTF-8') as fp:
value = fp.read().rstrip()
# Don't only split on spaces, but on whitespace, which allows to parse lines like
# 60b64ef992065e2600bfef6187a97f92398a9144 branch 'master' of git-server:/path/to/repo