neogit
neogit copied to clipboard
Error with file name with accent
Description
Stage a file with accent in its name doesn't work.
Neovim version
NVIM v0.9.2 Build type: Release LuaJIT 2.1.1692716794
Operating system and version
Debian 12
Steps to reproduce
-
git clone https://github.com/NeogitOrg/neogit.git && cd neogit
-
echo "Hello world" > fileéname
-
nvim -nu ~/minimal.lua
- Open nvim and
:Neogit
- Try to stage (
s
) the new file
Expected behavior
Stage the file.
Actual behavior
We have this error:
git --no-pager -c color.ui=always --no-optional-locks add -- "file\303\251name":
fatal: pathspec '"file\303\251name"' did not match any files
Minimal config
vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup({
{
"wbthomason/packer.nvim",
{
"NeogitOrg/neogit",
requires = {
{ "nvim-lua/plenary.nvim" },
},
config = function()
print("loaded neogit")
require("neogit").setup()
end,
},
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
})
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing neogit and dependencies.")
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()
This seems like a duplicate of #871.