Skip to content

Suppress upload-pack Wait() error on shallow clone

Jacob Vosmaer (GitLab) requested to merge detect-shallow-clone into master

Closes https://gitlab.com/gitlab-org/gitlab-workhorse/issues/36

It is a known bug in git-upload-pack that it exits unsuccessfully when the client does a 'shallow clone'. We don't want this non-zero process exit status to clutter our logs. In this change we buffer the first 4kB of the request body for git upload-pack and scan for a 'deepen' message (which indicates the clients wants to do a shallow clone). If deepen is found we suppress error reporting for a non-zero exit status of git upload-pack.

Merge request reports