neogit icon indicating copy to clipboard operation
neogit copied to clipboard

Error with file name with accent

Open misaflo opened this issue 1 year ago • 1 comments

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

  1. git clone https://github.com/NeogitOrg/neogit.git && cd neogit
  2. echo "Hello world" > fileéname
  3. nvim -nu ~/minimal.lua
  4. Open nvim and :Neogit
  5. 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()

misaflo avatar Oct 04 '23 12:10 misaflo

This seems like a duplicate of #871.

star-szr avatar Oct 04 '23 20:10 star-szr