Geo: Git clone with `--depth 1` times out when the secondary is not up-to-date
[Customer ticket](https://gitlab.zendesk.com/agent/tickets/369989)
A customer is noticing that `git fetch` from the Geo secondary randomly times out when the secondary is not up-to-date and the repo has to be proxied from the primary. They're on 15.8.3 and when the above condition is true, here's when it times out:
When `--depth 1` is set during a `git clone`.
The customer reproduced the problem with the following steps:
>- make a push of a 1MB file to a repository
>- try to clone the repository by reaching the secondary geo instance and using. --depth argument
>- the cli will get stuck
I was able to replicate this behavior with 15.8.1 with the following steps:
- Create a new empty project on the primary. Let it sync to the secondary.
- Push a large repo to the primary.
- Once uploaded and confirmed in the UI (and before enough time has passed to replicate the repo to the secondary), run `git clone --depth 1 git@<PROJECT_ON_SECONDARY>`. It hangs.
```sh
GitLabBook2:tests$ git clone --depth 1 git@SECONDARY_HOST:test-projects/rails-custom.git
Cloning into 'rails-custom'...
remote:
remote: This request to a Geo secondary node will be forwarded to the
remote: Geo primary node:
remote:
remote: git@PRIMARY_HOST:test-projects/rails-custom.git
remote:
^C
```
I had to `ctrl+C` after about 10 minutes. Once the repository replicated to the secondary, the same clone command succeeded in just a few seconds.
issue