What to do with Gitlab::Git::Env in gitaly-ruby

The library code in ruby/vendor/gitlab_git includes the Gitlab::Git::Env class. This is a bit of an odd duck. It uses request-scoped storage to deal with alternate object directories when doing work related to the Git pre-receive hook.

We don't have request-scoped storage in gitaly-ruby so if we ever hit code that uses Gitlab::Git::Env I expect we will either get a NameError exception for RequestStore or an empty result.

I think we basically don't want to use Gitlab::Git::Env in gitaly-ruby.

I'm wondering if we should make this explicit, maybe by monkey-patching some of Gitlab::Git::Env's methods. So that if we ever hit code in gitaly-ruby that needs it, it's clear that we should not be hitting it in the first place.

What do you think @ahmadsherif ?