1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 03:32:42 +01:00
phorge-phorge/src/applications/diffusion
epriestley 904dbf0db6 Make the "git upload-pack" proxy more robust
Summary:
Depends on D20381. Ref T8093. This makes minor improvements to the protocol proxy to handle cases where we add, remove, or replace refs and may need to move the "capabilities" section.

Rather than invoking a callback on every ref: parse the whole ref list into a data structure, mutate it if necessary (in a future diff), then dump it back into wire format.

This allows us to shift the capabilities data (which needs to be coupled with the first ref) around if we modify the first ref, and reorder the reflist alphabetically like git does.

When the server has no refs, Git sends no capabilities data. This is easy to emulate, just surprising.

Test Plan:
Tested the cases not covered by D20381:

  - Fetching where the fetch actually fetches data.
  - `ls-remote` when we hide the first ref (capabilities data properly moves to the first visible ref).
  - `ls-remote` when the remote is empty (we just drop the capabilities frame completely).

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T8093

Differential Revision: https://secure.phabricator.com/D20436
2019-04-18 05:04:05 -07:00
..
application Add a basic web UI for intracluster sync logs 2018-11-10 04:58:36 -08:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
conduit Clean up a few "%Q" stragglers in SVN repository browsing code 2019-03-05 11:30:55 -08:00
config Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
controller Give the "Code" tab in Diffusion more consistent (path-retaining) behavior 2019-03-25 14:45:02 -07:00
data When users browse to a submodule path in Diffusion explicitly, don't fatal 2017-12-18 09:18:22 -08:00
document Add a view option to disable blame in Diffusion and fix some view transition bugs 2018-04-30 15:32:23 -07:00
doorkeeper Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
edge Allow revisions to revert commits and one another, and commits to revert revisions 2018-02-02 08:25:58 -08:00
editfield Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
editor Show a warning when "git" is too old to support filesize limits 2019-04-16 05:33:29 -07:00
engine Accept pushes with arbitrary Git refs 2019-04-17 12:43:20 -07:00
engineextension Continue replacing Commit/Audit status checks with object-based checks 2018-09-10 11:20:31 -07:00
exception Filter and reject "--config" and "--debugger" flags to Mercurial in any position 2017-11-10 08:42:07 -08:00
garbagecollector Support ID-based repository URIs, and canonicalize repository URIs 2016-02-18 09:56:28 -08:00
gitlfs Fix a missing getSSHUser() callsite 2018-01-31 15:34:12 -08:00
harbormaster Pass commit authorship information to Buildkite 2018-08-27 12:52:11 -07:00
herald Accept pushes with arbitrary Git refs 2019-04-17 12:43:20 -07:00
management Make the Diffusion warning about "svnlook" and PATH more clear 2019-02-25 10:48:12 -08:00
panel Add icons to Settings 2019-01-23 13:41:41 -08:00
protocol Make the "git upload-pack" proxy more robust 2019-04-18 05:04:05 -07:00
query Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
relationships Convert all standard relationship-editing actions to modern Relationships code 2016-06-29 11:24:52 -07:00
remarkup When commits have a "rewritten" hint, try to show that in handles in other applications 2016-08-24 09:35:19 -07:00
request Correct an ambiguous regexp in DiffusionRequest 2018-11-01 20:01:39 -07:00
response Implement a Git LFS server which supports no operations 2016-03-17 08:08:43 -07:00
searchfield Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
ssh Proxy the "git upload-pack" wire protocol 2019-04-18 04:57:51 -07:00
symbol Provide character position information to symbol queries 2018-01-26 13:01:57 -08:00
typeahead Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
view Replace "URI->setQueryParams()" after initialization with a constructor argument 2019-02-14 11:46:37 -08:00
xaction Expose Audit actions for "transaction.search" in a basic way 2018-10-27 07:19:50 -07:00
DiffusionCommitAuditStatus.php Enrich "diffusion.commit.search" with identity, status, and message information 2018-09-12 12:45:44 -07:00
DiffusionLintSaveRunner.php Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00