Work around upstream pygit2 bug
Work around upstream pygit2 bug

See https://github.com/saltstack/salt/issues/28072 and
https://github.com/libgit2/pygit2/issues/583.

Fixes #28072.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt