HomePhabricator

Parse "shallow" frames in the Git "upload-pack" wire protocol parser

Description

Parse "shallow" frames in the Git "upload-pack" wire protocol parser

Summary:
Fixes T13309. If you void the warranty on a repository on disk and turn it into a shallow clone, Phabricator currently can't serve it.

We don't support hosting shallow working copies, but we should still parse and proxy the protocol rather than breaking in a mysterious way.

Test Plan:

  • Created a shallow working copy with mv X X.full; git clone --depth Y file://.../X.full X in the storage directory on disk.
  • Cloned it with git clone <uri>.
  • Deleted all the refs inside it so the wire only has "shallow" frames; cloned it.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13309

Differential Revision: https://secure.phabricator.com/D20577