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
This commit is contained in:
James Trew
2024-02-23 20:28:29 -05:00
committed by GitHub
parent fa81a4b133
commit 955e50dfed

View File

@@ -41,7 +41,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))
opts.git_command = vim.F.if_nil(opts.git_command, git_command({ "ls-files", "--exclude-standard", "--cached" }, opts))
opts.git_command = vim.F.if_nil(
opts.git_command,
git_command({ "-c", "core.quotepath=false", "ls-files", "--exclude-standard", "--cached" }, opts)
)
pickers
.new(opts, {