pygit2
pygit2 copied to clipboard
Repository.create_reference only accepts str and not bytes
Repository.create_reference only accepts str and not bytes. This is because Repository_create_reference_direct in repository.c uses the s specifier for parsing that argument, which only accepts str and implicitly encodes it using UTF-8. I would expect it to accept str or bytes, and if you pass bytes, it uses exactly what you pass in with no encoding/decoding.
This is a similar problem to #932.