There's no need for the `ThreadAffinity()` call here as `git_foreach()` already takes care of wrapping the native call.