GitHubivarvong

ply

main
ply6 git calls97 ms29 KiB4 cachedprotocol v2
325 lines19 KiBRaw
1// A stored transfer plan is untrusted input (#238 review): what its steps push is checked against the pack index, so a
2// writer of the plan store who edits the batches and recomputes both hashes (planHash and transferPlanHash are public
3// and unkeyed) is still refused before any request. The source is large enough for a plan of several batches.
4// The oracle is git http-backend behind a proxy that counts requests, and git's own view of the destination's refs.
5// Expected values, by hand: the transfer copies the commit's trees and blobs, each once. Every edit below names a set
6// of entries that is not that (one missing, one twice, one that is not in the pack, the commit itself), so none of
7// them can be the plan planTransfer made, whatever its hashes say: bad_request, no request, no ref.
8import { test, beforeAll as before, afterAll as after } from 'vitest';
9import assert from 'node:assert/strict';
10import http from 'node:http';
11import { randomFillSync } from 'node:crypto';
12import { mkdirSync, writeFileSync } from 'node:fs';
13import { join } from 'node:path';
14import { git, gitBuf, tmpRoot, makeBareRepo, startGitServer, initRepo } from './server.js';
15import { scanPackIndex } from '../src/packscanindex.js';
16import { resolvePackRange } from '../src/packrangeresolve.js';
17import { rangeFromBytes } from '../src/rangesource.js';
18import { createTransport } from '../src/http.js';
19import { planHash } from '../src/packplan.js';
20import { planTransfer, checkTransferPlan, transferPlanHash, transferKey, tempFor, TRANSFER_REF_PREFIX } from '../src/transferplan.js';
21import { transferStatus, transferStep, runTransfer } from '../src/transfer.js';
22import { unwrap } from './unwrap.js';
24const ident = ['-c', 'user.name=Ann Author', '-c', 'user.email=ann@x'];
25// ply reserves 300 * 68 + 32 KiB of each request for generated objects, so about 46 kB is left for entries: one
26// 30 kB incompressible blob a batch
27const BUDGET = { maxRequestBytes: 100_000, maxObjects: 300, maxObjectBytes: 1 << 20, maxCompressedObjectBytes: 1 << 20, reserveBytes: 0, reserveObjects: 0 };
28const COPY = 'refs/heads/copy';
29const BLOBS = 5;
30const streamOf = bytes => new ReadableStream({ start(c) { c.enqueue(bytes); c.close(); } });
32// A proxy in front of the git server that counts the requests it is sent.
33function countingProxy(upstream) {
34 let count = 0;
35 const server = http.createServer((req, res) => {
36 count++;
37 const to = new URL(req.url, upstream);
38 const up = http.request(to, { method: req.method, headers: { ...req.headers, host: to.host } }, r => { res.writeHead(r.statusCode, r.headers); r.pipe(res); });
39 req.pipe(up);
40 });
41 return new Promise(resolve => { server.listen(0, '127.0.0.1', () => resolve({ url: `http://127.0.0.1:${server.address().port}`, count: () => count, close: () => new Promise(done => { server.close(done); }) })); });
44let root, cleanup, srv, proxy, from, commit, sourceTree, honest, commitIndex, n = 0;
45before(async () => {
46 ({ root, cleanup } = tmpRoot());
47 srv = await startGitServer(root);
48 proxy = await countingProxy(srv.url);
49 const work = join(root, 'source');
50 mkdirSync(join(work, 'a'), { recursive: true });
51 initRepo(work);
52 for (let i = 0; i < BLOBS; i++) {
53 const blob = new Uint8Array(30_000);
54 randomFillSync(blob);
55 writeFileSync(join(work, i % 2 === 0 ? 'a' : '.', `r${i}.bin`), blob);
56 }
57 git(work, ['add', '.']);
58 git(work, [...ident, 'commit', '-q', '-m', 'source']);
59 const head = git(work, ['rev-parse', 'HEAD']).trim();
60 sourceTree = git(work, ['rev-parse', 'HEAD^{tree}']).trim();
61 const pack = new Uint8Array(gitBuf(work, ['pack-objects', '--stdout', '-q'], git(work, ['rev-list', '--objects', '--no-walk', head])));
62 commit = new Uint8Array(gitBuf(work, ['cat-file', 'commit', head]));
63 const scanned = unwrap(await scanPackIndex(streamOf(pack)));
64 const source = rangeFromBytes(pack);
65 from = { source, pack: scanned, resolved: unwrap(await resolvePackRange(scanned, source)) };
66 honest = unwrap(planTransfer(from.pack, from.resolved, { budget: BUDGET, ref: COPY, commit }));
67 // the pack's one commit: the entry the plan's selection leaves out (git rev-list --objects --no-walk names one)
68 const found = from.resolved.find(head);
69 assert.equal(found.tag, 'some');
70 commitIndex = found.value;
71});
72after(async () => { await proxy?.close(); await srv?.close(); cleanup?.(); });
74function destination() {
75 const name = `d${n++}`;
76 const bare = makeBareRepo(root, name);
77 return { bare, t: unwrap(createTransport(`${proxy.url}/${name}.git`)) };
79const refsOf = bare => git(bare, ['for-each-ref', '--format=%(refname) %(objectname)']).trim();
80// Everything a writer of the plan store can recompute over an edited plan, in the order planTransfer derives it: the
81// pack plan's hash, the key and the temp ref it names, each batch step's temp commit (where the batch's entries are in
82// the pack at all), the transfer's hash.
83function rehashed(plan) {
84 const { hash: _packHash, ...packBody } = plan.pack;
85 plan.pack.hash = planHash(packBody);
86 const key = transferKey(plan);
87 plan.tempRef = `${TRANSFER_REF_PREFIX}${key}`;
88 let prev = { tag: 'none' };
89 for (const [i, s] of plan.steps.entries()) {
90 s.prev = prev;
91 if (s.kind !== 'batch') continue;
92 const made = tempFor(from.resolved, plan.pack.batches[i].entries, { key, step: i, steps: plan.steps.length, prev });
93 if (made.ok) s.temp = made.value.commit.oid;
94 prev = { tag: 'some', value: s.temp };
95 }
96 const { hash: _hash, ...body } = plan;
97 plan.hash = transferPlanHash(body);
98 return plan;
100const edit = (label, change, rehash = true) => {
101 const plan = structuredClone(honest);
102 change(plan);
103 return [label, rehash ? rehashed(plan) : plan];
104};
105const ENTRY_POINTS = {
106 checkTransferPlan: (_t, plan) => checkTransferPlan(plan, { ref: COPY }),
107 transferStatus: (t, plan) => transferStatus(t, plan, { ref: COPY }),
108 transferStep: (t, plan) => transferStep(t, from, plan, 0, { commit, ref: COPY }),
109 'transferStep (last)': (t, plan) => transferStep(t, from, plan, honest.steps.length - 1, { commit, ref: COPY }),
110 runTransfer: (t, plan) => runTransfer(t, from, plan, commit, { maxSteps: 1, retries: 0, ref: COPY }),
111};
112// Every plan in `plans` ([label, plan]) is refused as bad_request by each named entry point; none throws; nothing is
113// sent; the destination has no refs.
114async function allRefusedUnsent(plans, names = Object.keys(ENTRY_POINTS)) {
115 const { bare, t } = destination();
116 const sentBefore = proxy.count();
117 const wrong = [];
118 for (const [label, plan] of plans) {
119 for (const name of names) {
120 let got;
121 try {
122 const r = await ENTRY_POINTS[name](t, plan);
123 got = r.ok ? `ok ${JSON.stringify(r.value)}` : r.error.code;
124 } catch (e) {
125 got = `threw ${String(e)}`;
126 }
127 if (got !== 'bad_request') wrong.push(`${label}: ${name}: ${got}`);
128 }
129 }
130 assert.deepEqual({ count: wrong.length, first: wrong.slice(0, 12) }, { count: 0, first: [] });
131 assert.equal(proxy.count() - sentBefore, 0, 'no request was sent');
132 assert.equal(refsOf(bare), '', 'the destination has no refs');
134const final = p => p.pack.batches.at(-1);
136test('the source gives a plan of at least three batches, and it runs: one push a batch, git shows the ref at the source tree', async () => {
137 // BLOBS incompressible 30 kB blobs under a budget that fits one a batch, then the trees
138 assert.ok(honest.pack.batches.length >= 3, `batches: ${honest.pack.batches.length}`);
139 assert.equal(honest.pack.batches.filter(b => b.kind === 'blobs').length, honest.pack.batches.length - 1);
140 const stored = JSON.parse(JSON.stringify(honest));
141 assert.ok(checkTransferPlan(stored, { ref: COPY }).ok);
142 const { bare, t } = destination();
143 const run = unwrap(await runTransfer(t, from, stored, commit, { ref: COPY }));
144 assert.deepEqual({ tag: run.tag, pushes: run.pushes }, { tag: 'done', pushes: honest.steps.length });
145 assert.equal(git(bare, ['rev-parse', `${COPY}^{tree}`]).trim(), sourceTree);
146 assert.equal(refsOf(bare).split('\n').length, 1, 'no temp ref left');
147 git(bare, ['fsck', '--strict']);
148});
150test('batches that do not partition the selection, both hashes recomputed, are refused by every entry point before any request', async () => {
151 await allRefusedUnsent([
152 edit('the final batch cut to one entry', p => { final(p).entries = final(p).entries.slice(0, 1); final(p).objects = 1; }),
153 edit('the final batch emptied', p => { final(p).entries = []; final(p).objects = 0; }),
154 edit('a blob batch emptied', p => { p.pack.batches[0].entries = []; p.pack.batches[0].objects = 0; }),
155 edit('an entry in two batches', p => { final(p).entries.push(p.pack.batches[0].entries[0]); final(p).objects += 1; }),
156 edit('an entry twice in one batch', p => { final(p).entries.push(final(p).entries[0]); final(p).objects += 1; }),
157 edit('an entry past the pack', p => { final(p).entries.push(p.pack.entries + 7); final(p).objects += 1; }),
158 edit('the pack\'s commit in a batch', p => { final(p).entries.push(commitIndex); final(p).objects += 1; }),
159 edit('a batch\'s object count not its entries', p => { p.pack.batches[1].objects += 1; }),
160 edit('an entry count that is not the selection\'s', p => { p.pack.entries += 1; }),
161 edit('the selection out of pack order', p => { p.pack.select.reverse(); }),
162 edit('no selection', p => { p.pack.select = null; }),
163 edit('a step fewer than batches', p => { p.steps.splice(0, 1); p.steps[0].prev = { tag: 'none' }; }),
164 edit('one final batch without entries', p => { p.pack.batches = [{ kind: 'final' }]; p.steps = [{ kind: 'final', prev: { tag: 'none' } }]; }, false),
165 ]);
166});
168test('a selection that is not the pack\'s trees and blobs, both hashes recomputed, is refused by a step and a run before any request', async () => {
169 // checkTransferPlan and transferStatus hold no pack; the entry points that push do, and check against its index
170 await allRefusedUnsent([
171 edit('the pack\'s commit selected and pushed', p => { p.pack.select = [...p.pack.select, commitIndex].sort((a, b) => a - b); p.pack.entries += 1; final(p).entries.push(commitIndex); final(p).objects += 1; }),
172 edit('a selected entry dropped everywhere, the counts kept consistent', p => { const gone = final(p).entries.pop(); final(p).objects -= 1; p.pack.select = p.pack.select.filter(i => i !== gone); p.pack.entries -= 1; }),
173 ], ['transferStep', 'transferStep (last)', 'runTransfer']);
174});
176// Every path into a JSON value: its keys and indices from the top.
177function* pathsOf(v, here = []) {
178 if (typeof v !== 'object' || v === null) return;
179 for (const k of Object.keys(v)) {
180 yield [...here, k];
181 yield* pathsOf(v[k], [...here, k]);
182 }
184const DELETE = Symbol('delete');
185const WRONG = [DELETE, null, 0, -1, 1.5, 'x', true, [], {}, [null], { tag: 'some' }, { tag: 'some', value: 7 }];
186function mutated(plan, path, value) {
187 const copy = structuredClone(plan);
188 let o = copy;
189 for (const k of path.slice(0, -1)) o = o[k];
190 const last = path.at(-1);
191 if (value !== DELETE) o[last] = value;
192 else if (Array.isArray(o)) o.splice(Number(last), 1);
193 else delete o[last];
194 return copy;
197test('a generated corpus over every field of a multi-batch plan (missing, wrong type, negative, fractional) is refused unsent by every entry point; with everything recomputed the check still never throws', async () => {
198 const same = JSON.stringify(honest);
199 const corpus = [];
200 const forged = [];
201 for (const path of pathsOf(honest)) {
202 for (const value of WRONG) {
203 const plan = mutated(honest, path, value);
204 if (JSON.stringify(plan) === same) continue;
205 const label = `${path.join('.')} = ${value === DELETE ? 'deleted' : JSON.stringify(value)}`;
206 corpus.push([label, plan]);
207 // the same edit by a writer who recomputes everything derived, where that can be computed at all (an edit the
208 // recomputing undoes gives the honest plan back, and one that stays self-consistent is a plan: only the check's
209 // totality is asserted for these)
210 try { forged.push([label, rehashed(structuredClone(plan))]); } catch { /* not hashable: the stored form above stands */ }
211 }
212 }
213 for (const [label, plan] of forged) {
214 let got;
215 try {
216 const r = checkTransferPlan(plan, { ref: COPY });
217 got = r.ok ? 'ok' : r.error.code;
218 } catch (e) {
219 got = `threw ${String(e)}`;
220 }
221 assert.ok(got === 'ok' || got === 'bad_request', `${label} (rehashed): checkTransferPlan: ${got}`);
222 }
223 assert.ok(corpus.length > 1000, `the corpus covers the plan (${corpus.length} plans)`);
224 await allRefusedUnsent(corpus);
225});
227// A hole in an array of the plan (an index below its length that is not an element). JSON cannot hold one, but a
228// structured-clone store (Durable Object storage, IndexedDB) hands one back: structuredClone below is that round trip,
229// and the hole is asserted to survive it. Expected value, by the rule and not from the code: a plan with a hole is not
230// one planTransfer made (it writes every element), so it is a corrupt plan: bad_request, what 'plan', from every
231// entry point, no throw, no request, with the hashes as stored and with everything a writer can recompute recomputed.
232const HOLED = {
233 steps: p => p.steps,
234 'pack.batches': p => p.pack.batches,
235 'pack.select': p => p.pack.select,
236 'a blobs batch\'s entries': p => p.pack.batches[0].entries,
237 'the final batch\'s entries': p => final(p).entries,
238};
239// The hashes and the temp ref over a plan with a hole, as a writer of the store recomputes them (the public, unkeyed
240// functions; a hole is hashed as JSON writes it, null).
241function resealed(plan) {
242 const { hash: _packHash, ...packBody } = plan.pack;
243 plan.pack.hash = planHash(packBody);
244 plan.tempRef = `${TRANSFER_REF_PREFIX}${transferKey(plan)}`;
245 const { hash: _hash, ...body } = plan;
246 plan.hash = transferPlanHash(body);
247 return plan;
249test('a plan with a hole in steps, pack.batches, pack.select or a batch\'s entries is refused as a corrupt plan by every entry point: no throw, no request', async () => {
250 const { bare, t } = destination();
251 const sentBefore = proxy.count();
252 const wrong = [];
253 let cases = 0;
254 for (const [name, arrayOf] of Object.entries(HOLED)) {
255 const length = arrayOf(honest).length;
256 // the first element, the last, and one past the end (a trailing hole: the length is one more than the elements)
257 for (const place of new Set([0, length - 1, length])) {
258 for (const reseal of [false, true]) {
259 const plan = structuredClone(honest);
260 const list = arrayOf(plan);
261 if (place === length) list.length = length + 1;
262 else delete list[place];
263 const stored = structuredClone(reseal ? resealed(plan) : plan);
264 assert.equal(Object.hasOwn(arrayOf(stored), place), false, `${name}: the hole at ${place} survives a structured clone`);
265 assert.equal(arrayOf(stored).length, Math.max(length, place + 1));
266 cases++;
267 for (const [entry, call] of Object.entries(ENTRY_POINTS)) {
268 let got;
269 try {
270 const r = await call(t, stored);
271 got = r.ok ? `ok ${JSON.stringify(r.value)}` : `${r.error.code} ${r.error.what}`;
272 } catch (e) {
273 got = `threw ${String(e)}`;
274 }
275 if (got !== 'bad_request plan') wrong.push(`${name}[${place}]${reseal ? ' resealed' : ''}: ${entry}: ${got}`);
276 }
277 }
278 }
279 }
280 // 5 arrays, 3 places each (2 where an array has one element), hashes as stored and recomputed
281 assert.ok(cases >= 20, `cases: ${cases}`);
282 assert.deepEqual({ count: wrong.length, first: wrong.slice(0, 12) }, { count: 0, first: [] });
283 assert.equal(proxy.count() - sentBefore, 0, 'no request was sent');
284 assert.equal(refsOf(bare), '', 'the destination has no refs');
285});
287// The pack check's two other refusals (planFitsPack), through the entry points that hold the pack. Expected values, by
288// hand, from the rule above (a transfer pushes the pack's trees and blobs, each once, held to the pack before any
289// request; SAFETY.md and the README's transfer section say the plan is untrusted):
290// - a selection of every tree and blob of the pack in pack order, then one index past the pack's last entry
291// (entries are 0..count-1, so `count` names nothing), put in the final batch as well so the batches still partition
292// the selection, both hashes recomputed. The plan store's own check passes it (it holds no pack); with the pack in
293// hand it selects something the pack does not hold: bad_request, no request, no ref
294// - the honest plan with a resolved index that is not this pack's: git's empty pack (pack-objects given no object:
295// the 12-byte header with count 0 and the 20-byte trailer, 32 bytes), scanned and resolved, has no entry at all,
296// while the pack has several. The type of the pack's first entry (0) cannot be read, so the selection cannot be
297// held to the pack: bad_request naming entry 0, no request, no ref
298test('a selection with an entry past the pack, and a resolved index without the pack\'s entries, are refused by a step and a run before any request', async () => {
299 const { bare, t } = destination();
300 const sentBefore = proxy.count();
301 const past = from.pack.count;
302 const [, extra] = edit('an entry past the pack selected and pushed', p => { p.pack.select = [...p.pack.select, past]; p.pack.entries += 1; final(p).entries.push(past); final(p).objects += 1; });
303 assert.equal(checkTransferPlan(extra, { ref: COPY }).ok, true, 'hashes and partition hold: only the pack can refuse this plan');
304 const emptyPack = new Uint8Array(gitBuf(join(root, 'source'), ['pack-objects', '--stdout', '-q'], ''));
305 assert.equal(emptyPack.length, 32);
306 const scannedEmpty = unwrap(await scanPackIndex(streamOf(emptyPack)));
307 const unresolved = { ...from, resolved: unwrap(await resolvePackRange(scannedEmpty, rangeFromBytes(emptyPack))) };
308 const last = honest.steps.length - 1;
309 const cells = [
310 ['past the pack: transferStep', () => transferStep(t, from, extra, 0, { commit, ref: COPY }), /selects entries the pack does not hold/],
311 ['past the pack: transferStep (last)', () => transferStep(t, from, extra, last, { commit, ref: COPY }), /selects entries the pack does not hold/],
312 ['past the pack: runTransfer', () => runTransfer(t, from, extra, commit, { maxSteps: 1, retries: 0, ref: COPY }), /selects entries the pack does not hold/],
313 ['another index: transferStep', () => transferStep(t, unresolved, honest, 0, { commit, ref: COPY }), /entry 0 is not in the resolved index/],
314 ['another index: transferStep (last)', () => transferStep(t, unresolved, honest, last, { commit, ref: COPY }), /entry 0 is not in the resolved index/],
315 ['another index: runTransfer', () => runTransfer(t, unresolved, honest, commit, { maxSteps: 1, retries: 0, ref: COPY }), /entry 0 is not in the resolved index/],
316 ];
317 for (const [label, run, message] of cells) {
318 const r = await run();
319 assert.equal(r.ok, false, label);
320 assert.equal(r.error.code, 'bad_request', `${label}: ${r.error.message}`);
321 assert.match(r.error.message, message, label);
322 }
323 assert.equal(proxy.count() - sentBefore, 0, 'no request was sent');
324 assert.equal(refsOf(bare), '', 'the destination has no refs');
325});
Diagnostics6 git calls · 97 ms
CallStatusSizeTime097 ms
discover200191 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=1
git.response.bytes=191
git.server.agent=git/github-9922ec520325-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=191
git.pkt.payload.max=36
ls-refs20012 KiB · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=11990
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=152
git.pkt.data=151
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=11990
git.pkt.payload.max=122
git.ls_refs.count=151
git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 102004.2 KiB · hit1 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=4347
git.response.cache=HIT
git.response.duration_ms=1
git.fetch.filter=tree:0
git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=4347
git.pkt.payload.max=4247
git.sideband.band1.bytes=4247
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=10
git.pack.bytes=4247
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=a6caf8e129bea82c9bae4cbc7c130c9205add400
git.pack.full=10
Open pack map
fetchtree:0200919 B · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=919
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=800d30ba8923860bfc460ca884b7f9ba22083588
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=919
git.pkt.payload.max=892
git.sideband.band1.bytes=892
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=892
git.pack.trailer=5323b9266eea5ded637285d1c5320699f12be76e
Open pack map
fetchtree:02005.6 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=88
git.response.bytes=5724
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=58fabb6768b3f737ee9cd8bac647bdc27405fb4d
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=5724
git.pkt.payload.max=5697
git.sideband.band1.bytes=5697
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=5697
git.pack.trailer=be7e0453974a5fe832f9065a33bb7e3434c10e9b
Open pack map
fetch2006.1 KiB88 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=6272
git.response.cache=MISS
git.response.duration_ms=88
git.fetch.wants=cbff1067a3366089da7b3e965baddbba8fd9752d
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=6272
git.pkt.payload.max=6245
git.sideband.band1.bytes=6245
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://github.com/ivarvong/ply
Ref
refs/heads/main
Commit
19912563f540228593df0c489082e5e2508e21e4
cf-ray
a5e2ce982995efad
Request
307a8102…
Protocol
v2 · sha1
Agent
git/github-9922ec520325-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format