Skip to content

fix(find/git): avoid UTF-8 mid-char byte-slice panics - #3435

Open
mohammedelkarsh wants to merge 1 commit into
rtk-ai:developfrom
mohammedelkarsh:fix/3415-utf8-byte-slice-panics
Open

fix(find/git): avoid UTF-8 mid-char byte-slice panics#3435
mohammedelkarsh wants to merge 1 commit into
rtk-ai:developfrom
mohammedelkarsh:fix/3415-utf8-byte-slice-panics

Conversation

@mohammedelkarsh

Copy link
Copy Markdown

Summary

Fixes #3415

Test plan

  • cargo test --bin rtk truncate_path_display
  • cargo test --bin rtk test_parse_commit_output
  • cargo fmt --all
  • cargo clippy --bin rtk --all-targets -- -D warnings

Truncate find path display with floor_char_boundary, and parse git
commit output via strip_prefix so non-ASCII / malformed first lines
cannot panic.

Fixes rtk-ai#3415
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.

rtk find panics on a non-ASCII directory path >50 bytes, and rtk git commit panics when the first output line does not start with [

1 participant