Skip to content

utf-8 branch name issue in SymbolicReference._get_ref_info_helper #954

Closed
@grho

Description

@grho

Hi,
a branch is shown incorrectly when contains utf-8 characters

Branch name:
refs/heads/zażółć_gęślą_jaźń

The issue can be fixed by adding encoding in SymbolicReference._get_ref_info_helper.
Proposed change:
Replace

with open(osp.join(repodir, ref_path), 'rt') as fp:

Current result (e.g. shown as active_branch):
refs/heads/zażółć_gęślą_jaźń

with

with open(osp.join(repodir, ref_path), 'rt', encoding="utf-8") as fp:

Expected result:
refs/heads/zażółć_gęślą_jaźń

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions