rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.69k stars 388 forks source link

Add `set_head_bytes()` #925

Closed drmikehenry closed 1 year ago

drmikehenry commented 1 year ago

I'd like to have Repository::set_head_bytes() that works like Repository::set_head() but which does not require valid UTF8 (analogous to having both Repository::set_namespace() and Repository::set_namespace_bytes()). Without set_head_bytes(), if a user chooses a branch name that's invalid UTF8, I can't set HEAD to that branch.

Thanks, Michael Henry