Skip to content

git: skip status entries with non-UTF-8 paths instead of panicking#1210

Open
SAY-5 wants to merge 1 commit into
lsd-rs:mainfrom
SAY-5:say5/git-status-non-utf8-1207
Open

git: skip status entries with non-UTF-8 paths instead of panicking#1210
SAY-5 wants to merge 1 commit into
lsd-rs:mainfrom
SAY-5:say5/git-status-non-utf8-1207

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Fixes #1207.

StatusEntry::path() returns None when the filename bytes can't be decoded as UTF-8. Filenames like ''$'\\357'' in the user's repro hit this; the previous .unwrap() panicked at src/git.rs:64 on lsd --git -l. Skip the entry instead, the file still appears in the listing, just without a Git status indicator.

@SAY-5 SAY-5 requested a review from zwpaper as a code owner May 2, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ Bug ] thread 'main' panicked at src/git.rs:64:60:

1 participant