diff options
author | Harmon <Harmon758@gmail.com> | 2020-02-18 12:51:03 -0600 |
---|---|---|
committer | Harmon <Harmon758@gmail.com> | 2020-02-18 12:55:47 -0600 |
commit | 863abe8b550d48c020087384d33995ad3dc57638 (patch) | |
tree | da4442dee29f7a0c822abe174929327e4f658dbb /git | |
parent | 84c3f60fc805e0d5e5be488c4dd0ad5af275e495 (diff) | |
download | gitpython-863abe8b550d48c020087384d33995ad3dc57638.tar.gz |
Use UTF-8 encoding when getting information about a symbolic reference
Fixes #774
Diffstat (limited to 'git')
-rw-r--r-- | git/refs/symbolic.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |