1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-24 05:36:19 +02:00

Support multibyte characters in Files pane

This commit is contained in:
Ryooooooga 2021-03-02 11:51:03 +09:00 committed by Jesse Duffield
parent 50e4e9d58d
commit e5ba0d9d9c

View File

@ -72,7 +72,13 @@ func (c *GitCommand) GitStatus(opts GitStatusOptions) (string, error) {
noRenamesFlag = "--no-renames"
}
return c.OSCommand.RunCommandWithOutput("git status %s --porcelain %s", opts.UntrackedFilesArg, noRenamesFlag)
statusLines, err := c.OSCommand.RunCommandWithOutput("git status %s --porcelain -z %s", opts.UntrackedFilesArg, noRenamesFlag)
if err != nil {
return "", err
}
statusLines = strings.Replace(statusLines, "\x00", "\n", -1)
return statusLines, nil
}
// MergeStatusFiles merge status files