pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

Repository.create_reference only accepts str and not bytes

Open jnrbsn opened this issue 5 years ago • 0 comments

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.

jnrbsn avatar Dec 30 '19 23:12 jnrbsn