Skip to content

Crashes when trying to show log in a git repo with chinese commit messages on Windows 10 #188

Closed
@slaughtering

Description

@slaughtering

Describe the bug
Crashes when trying to show log in a git repo with chinese commit messages on Windows 10

To Reproduce
Steps to reproduce the behavior:

  1. Open cmd or pwsh and cd to a git repo with chinese commit log messages
  2. Run gitui
  3. Press 2 to show the log
  4. See error:
    panic: PanicInfo { payload: Any, message: Some(byte index 118 is not a char boundary; it is inside '里' (bytes 117..120)
    C:\repos\someproject>中文提交信息(some chinese commit message)`), location: Location { file: "/rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\src\libcore\str\mod.rs", line: 1920, col: 47 } }
    trace:
    0: <unknown>
    1: <unknown>
    2: <unknown>
    3: <unknown>
    4: <unknown>
    5: <unknown>
    6: <unknown>
    7: <unknown>
    8: <unknown>
    9: <unknown>
    10: <unknown>
    11: <unknown>
    12: <unknown>
    13: <unknown>
    14: git_libgit2_version
    15: BaseThreadInitThunk
    16: RtlUserThreadStart

Context (please complete the following information):

  • OS/Distro + Version: [Windows 10 1909]
  • GitUI Version [0.8.1]
  • Rust version: [N/A]

Additional context
The same problem in pwsh 7.0.2 and cmd.exe, gitui.exe binary from https://github.com/extrawurst/gitui/releases/tag/v0.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions