`using (ThreadAffinity())` is necessary to turn error codes into exceptions with messages from libgit2 - no return code here, so it's not needed.