rust-lang / rust-lang/git2-rs

Question: Is the return value of `StatusEntry::path_bytes` safe for `OsStr::from_encoded_bytes_unchecked` for a local repository from the same OS?

Open
#1,200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.1k
Forks
450
Avg merge
11m
Merged PRs (30d)
1

Description

I'm kind of assuming the answer is "yes" since I think path_bytes should always be a valid path string from the OS's filesystem, but I figured it would be better to ask people more knowledgeable about libgit2 and Rust.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the documented contracts for StatusEntry::path_bytes and OsStr::from_encoded_bytes_unchecked, then review the libgit2 and Rust assumptions relevant to a local repository on the same OS. Done means providing a maintainer-confirmed safety explanation or updating the relevant documentation; no file or test is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.