I'm getting that if you pass a 40-character string SHA to repo.descendant_of() that doesn't correspond to a commit (for either argument), then the function always returns True. I haven't verified, but it looks like it could be because of this line:
|
return PyBool_FromLong(git_graph_descendant_of(self->repo, &oid1, &oid2)); |
The PyBool_FromLong() converts an error code to True. Instead, an error code should result in an exception IMO.
I'm getting that if you pass a 40-character string SHA to
repo.descendant_of()that doesn't correspond to a commit (for either argument), then the function always returnsTrue. I haven't verified, but it looks like it could be because of this line:pygit2/src/repository.c
Line 593 in 976450a
The
PyBool_FromLong()converts an error code toTrue. Instead, an error code should result in an exception IMO.