What is `git_oid_struct`? Where is that coming from?

In any case, this cast should be unnecessary. Methods can be invoked against objects of type `id`.