Page MenuHomePhabricator

[DRAFT] Parse the Git wire protocol in receive-pack
Changes PlannedPublic

Authored by epriestley on May 20 2016, 6:14 PM.
Tags
None
Referenced Files
F19093198: D15954.id.diff
Dec 3 2025, 8:45 PM
F19083849: D15954.diff
Dec 2 2025, 1:55 PM
F18993295: D15954.diff
Nov 19 2025, 7:38 AM
F18972962: D15954.id38414.diff
Nov 15 2025, 2:43 PM
F18972297: D15954.diff
Nov 15 2025, 1:26 PM
F18858062: D15954.id.diff
Nov 1 2025, 8:36 PM
F18853011: D15954.diff
Oct 31 2025, 1:40 PM
F18842970: D15954.id.diff
Oct 28 2025, 8:03 PM
Subscribers

Details

Summary

Ref T5000. Git's protocol is mostly fairly parsable. It has PACK blobs which are trickier to parse, but we don't currently need to decode them (and I think we may never need to decode them: we only need to rewrite refs and response codes, not object content).

To rewrite the actual response, we only need to rewrite this:

0033ng refs/heads/master pre-receive hook declined\n

...into this:

0019ok refs/heads/master \n

...which is pretty reasonable. This doesn't emit or interpret frames and isn't suitable to upstream since it also writes all of the protocol out to tempfiles, but I'm reasonably confident I can estimate T5000 now.

Test Plan

N/A

Diff Detail

Repository
rP Phabricator
Branch
git1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 12284
Build 15527: Run Core Tests
Build 15526: arc lint + arc unit