feat(git_files): support emoji/unicode in filenames (#2943)

Pass `core.quotepath=false` to achieve this.

Could alternatively pass `-z` but that uses `\0` line termination and
complicates things.

Closes #2900

(cherry picked from commit 955e50dfed)
This commit is contained in:
James Trew
2024-02-23 20:28:29 -05:00
committed by Simon Hauser
parent ec3474b596
commit 93dc724f38

View File

@@ -35,7 +35,10 @@ git.files = function(opts)
-- By creating the entry maker after the cwd options,
-- we ensure the maker uses the cwd options when being created.
opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_file(opts))
local git_command = vim.F.if_nil(opts.git_command, { "git", "ls-files", "--exclude-standard", "--cached" })
local git_command = vim.F.if_nil(
opts.git_command,
{ "git", "-c", "core.quotepath=false", "ls-files", "--exclude-standard", "--cached" }
)
pickers
.new(opts, {