Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treefmt2 doesn't properly deal with non ascii paths (?) #485

Open
sternenseemann opened this issue Nov 18, 2024 · 0 comments · May be fixed by #488
Open

treefmt2 doesn't properly deal with non ascii paths (?) #485

sternenseemann opened this issue Nov 18, 2024 · 0 comments · May be fixed by #488
Assignees
Labels
bug Something isn't working

Comments

@sternenseemann
Copy link

Describe the bug

We have a directory, fun/🕰️, in a repository. treefmt complains like this:

WARN walk | git: Path /home/lukas/src/depot/"fun/\360\237\225\260\357\270\217/OWNERS" is in the worktree but appears to have been removed from the filesystem

It seems like it is unable to match up the fs paths and the one it gets from git.

To Reproduce

git clone https://code.tvl.fyi/depot.git
nix-build -A tools.depotfmt
./result/bin/depotfmt

Expected behavior

No warning is created.

System information

NixOS, x86_64-linux, treefmt 2.1.0

@sternenseemann sternenseemann added the bug Something isn't working label Nov 18, 2024
@brianmcgee brianmcgee self-assigned this Nov 18, 2024
brianmcgee added a commit that referenced this issue Nov 23, 2024
`git ls-files` was providing some `"..."` quoted paths when it encountered emojis in the file/dir name.

Running them through `strconv.Unquote` fixes things.

Fixes #485

Signed-off-by: Brian McGee <[email protected]>
@brianmcgee brianmcgee linked a pull request Nov 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants