A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gitpython-developers/GitPython/issues/774 below:

Unicode characters in branch name · Issue #774 · gitpython-developers/GitPython · GitHub

Hi! I an trying to get diffs using GitPython, and i have an issue when branch name have unicode characters.

Here is repo where bug can be reproduced:
https://github.com/timqsh/test_git_python
branch:
МояВетка

when i run this code:

repo = git.Repo('.')
HEAD = repo.head.commit

i get this error:

Traceback (most recent call last):
  File ".\test.py", line 4, in <module>
    HEAD = repo.head.commit
  File "C:\Users\kushukov\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\refs\symbolic.py", line 200, in _get_commit
    obj = self._get_object()
  File "C:\Users\kushukov\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\refs\symbolic.py", line 193, in _get_object
    return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
  File "C:\Users\kushukov\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\refs\symbolic.py", line 135, in dereference_recursive
    hexsha, ref_path = cls._get_ref_info(repo, ref_path)
  File "C:\Users\kushukov\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\refs\symbolic.py", line 184, in _get_ref_info
    return cls._get_ref_info_helper(repo, ref_path)
  File "C:\Users\kushukov\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\refs\symbolic.py", line 167, in _get_ref_info_helper
    raise ValueError("Reference at %r does not exist" % ref_path)
ValueError: Reference at 'refs/heads/Р\u045aР\u0455С\u040fР\u2019Р\xb5С\u201aРєР°' does not exist

I am testing this on Windows 10.

forgot to add:
GitPython 2.1.10


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4