Page MenuHomePhabricator

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

Authored by epriestley on Jun 13 2019, 11:31 PM.
Tags
None
Referenced Files
F12843371: D20577.id49114.diff
Thu, Mar 28, 10:43 PM
Unknown Object (File)
Sat, Mar 23, 7:37 PM
Unknown Object (File)
Sat, Mar 23, 12:41 PM
Unknown Object (File)
Feb 11 2024, 2:45 PM
Unknown Object (File)
Jan 6 2024, 4:26 AM
Unknown Object (File)
Dec 30 2023, 4:56 PM
Unknown Object (File)
Dec 27 2023, 9:46 AM
Unknown Object (File)
Dec 26 2023, 6:02 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

In the Discourse thread (https://discourse.phabricator-community.org/t/how-to-have-a-shallow-git-mirror/2805/) the reporting user also reported that this patch worked in their (illegal, forbidden) use case.

Is it expected that B22956 never completed?

Oh, not sure what happened there -- that's the local result, so maybe I ^C'd too fast. Let me just kick it...

  • Plus a rebase for the msortv() change.
This revision is now accepted and ready to land.Jun 18 2019, 9:08 PM