Artifactspublic-v0

ply

main
ply4 git calls253 ms44 KiB2 cachedprotocol v2
306 lines21 KiBRaw
1// A stock `git http-backend` repository: uploadpack.allowFilter unset, git's default. Its `fetch=` line advertises no
2// `filter`, and its upload-pack dies on a `filter` argument with an empty response (no ERR, no flush). Every operation
3// runs against such a repository and against its twin with allowFilter on (makeBareRepo's fixture), both seeded with
4// the same commits: the answers must be equal (oids, trees, file bytes) and every write fsck --strict clean. Also: the
5// learning (one advertisement probe per quirks record, the span attributes that say so, an advertisement in hand
6// answering first), the pack limits on the wider unfiltered pack (limit_exceeded, never protocol), and an empty response
7// from a server that does advertise `filter` staying the protocol error it is.
8import { test, beforeAll as before, afterAll as after } from 'vitest';
9import assert from 'node:assert/strict';
10import { join } from 'node:path';
11import { mkdirSync, writeFileSync, chmodSync } from 'node:fs';
12import { createHash } from 'node:crypto';
13import { git, gitBuf, tmpRoot, makeBareRepo, startGitServer, fsckProblems, initRepo } from './server.js';
14import { startProxy } from './proxy.js';
15import { editFile } from '../src/edit.js';
16import { commitChanges } from '../src/changes.js';
17import { pushTree } from '../src/tree.js';
18import { readFile, listTree, readCommit } from '../src/read.js';
19import { readLog } from '../src/log.js';
20import { checkoutTree } from '../src/checkout.js';
21import { mergeBranch } from '../src/merge.js';
22import { rebaseBranch, cherryPick, revertCommit } from '../src/rebase.js';
23import { discover } from '../src/discover.js';
24import { createTransport } from '../src/http.js';
25import { forgetQuirks } from '../src/transport.js';
26import { DEFAULT_LIMITS } from '../src/limits.js';
27import { Tracer, arrayExporter, flattenLine } from '../src/otel.js';
28import { unwrap } from './unwrap.js';
30const T = 1_700_000_000;
31const A = { name: 'Ada', email: 'ada@x', tz: '+0000', time: T };
32let root, cleanup, srv, work, seeded, n = 0;
33// 200 KB that no zlib level shrinks: the unfiltered snapshot is bigger than any filtered answer by this much
34const noise = len => { const out = Buffer.alloc(len); for (let i = 0, b = Buffer.alloc(0); i < len; i += 32) { b = createHash('sha256').update(b).update(String(i)).digest(); b.copy(out, i); } return out; };
36before(async () => {
37 ({ root, cleanup } = tmpRoot()); srv = await startGitServer(root);
38 work = join(root, 'work'); mkdirSync(work); initRepo(work);
39 const put = files => { for (const [p, v] of Object.entries(files)) { mkdirSync(join(work, p, '..'), { recursive: true }); writeFileSync(join(work, p), v); } };
40 const commit = (msg, i) => { git(work, ['add', '-A']); git(work, ['commit', '-q', '-m', msg], { env: { ...process.env, GIT_AUTHOR_DATE: `${T - 100 + i} +0000`, GIT_COMMITTER_DATE: `${T - 100 + i} +0000` } }); return git(work, ['rev-parse', 'HEAD']).trim(); };
41 put({ 'README.md': '# readme\n', 'a/b/c.txt': 'deep MARK\n', 'x.txt': 'x1\nx2\nx3\n', 'y.txt': 'y1\n', 'd/z.txt': 'z\n', 'big.bin': noise(200_000), 'run.sh': '#!/bin/sh\necho hi\n' });
42 chmodSync(join(work, 'run.sh'), 0o755);
43 const base = commit('base', 0);
44 git(work, ['tag', '-a', '-m', 'v1', 'v1']);
45 git(work, ['checkout', '-q', '-b', 'feat']); put({ 'x.txt': 'x1\nx2 feat\nx3\n' }); const feat = commit('feat', 1);
46 git(work, ['checkout', '-q', '-b', 'feat2', base]); put({ 'd/z.txt': 'z feat2\n' }); const feat2 = commit('feat2', 2);
47 git(work, ['checkout', '-q', 'main']); put({ 'y.txt': 'y1 main\n' }); const main = commit('main', 3);
48 seeded = { base, feat, feat2, main };
49});
50after(async () => { await srv.close(); cleanup(); });
52// Twin repositories with the same refs: `filter` (allowFilter on) and `stock` (git's defaults).
53function twins() {
54 const name = `t${n++}`;
55 const out = {};
56 for (const kind of ['filter', 'stock']) {
57 const bare = makeBareRepo(root, `${name}-${kind}`, { stock: kind === 'stock' });
58 git(work, ['push', '-q', bare, 'refs/heads/*:refs/heads/*', 'refs/tags/*:refs/tags/*']);
59 out[kind] = { bare, url: `${srv.url}/${name}-${kind}.git` };
60 }
61 return out;
63const drain = async stream => { const parts = []; for await (const c of stream) parts.push(Buffer.from(c)); return Buffer.concat(parts); };
64const spansOf = ex => ex.lines.flatMap(flattenLine);
65const traced = () => { const ex = arrayExporter(); return { ex, tracer: new Tracer({ exporter: ex }) }; };
66// A result as compared across the twins: streams read to bytes, the file iterator drained, push sizes left out (the thin
67// pack may pick other bases when the unfiltered fetch harvested more trees; what landed is compared by oid instead).
68async function plain(v) {
69 if (v instanceof ReadableStream) return (await drain(v)).toString('base64');
70 if (v instanceof Uint8Array) return Buffer.from(v).toString('base64');
71 if (v && typeof v[Symbol.asyncIterator] === 'function') { const files = []; for await (const f of v) files.push({ ...f, stream: f.stream === null ? null : (await drain(f.stream)).toString('base64') }); return files; }
72 if (Array.isArray(v)) return Promise.all(v.map(plain));
73 if (v && typeof v === 'object') { const o = {}; for (const [k, x] of Object.entries(v)) if (k !== 'pushBytes') o[k] = await plain(x); return o; }
74 return v;
77test('the fixture: the stock twin advertises no filter on fetch=, the other does (what the bug report saw)', async () => {
78 const { stock, filter } = twins();
79 const info = async url => unwrap(await discover(unwrap(createTransport(url, { tracer: new Tracer() }))));
80 assert.equal((await info(stock.url)).filter, false);
81 assert.equal((await info(filter.url)).filter, true);
82});
84test('reads: readFile, listTree, readCommit, readLog, checkoutTree answer the same on both; one probe, then no filter', async () => {
85 const { stock, filter } = twins();
86 const reads = async (url, quirks, tracer) => {
87 const o = () => ({ tracer, quirks });
88 const out = {};
89 for (const path of ['README.md', 'a/b/c.txt', 'big.bin', 'run.sh']) out[`readFile ${path}`] = await plain(unwrap(await readFile(url, { path }, o())));
90 out['readFile v1:x.txt'] = await plain(unwrap(await readFile(url, { ref: 'v1', path: 'x.txt' }, o())));
91 for (const path of ['', 'a', 'a/b', 'd']) out[`listTree ${path}`] = await plain(unwrap(await listTree(url, { ref: 'feat2', path }, o())));
92 out.readCommit = await plain(unwrap(await readCommit(url, { ref: 'main' }, o())));
93 out['readCommit oid'] = await plain(unwrap(await readCommit(url, { ref: seeded.feat }, o())));
94 out.readLog = await plain(unwrap(await readLog(url, { ref: 'main', limit: 3 }, o())));
95 out.checkoutTree = await plain(unwrap(await checkoutTree(url, { ref: 'main' }, o())));
96 out['checkoutTree a'] = await plain(unwrap(await checkoutTree(url, { ref: 'feat', path: 'a' }, o())));
97 return out;
98 };
99 const fq = {}, sq = {};
100 const want = await reads(filter.url, fq, new Tracer());
101 const t = traced();
102 const got = await reads(stock.url, sq, t.tracer);
103 assert.deepEqual(got, want);
104 assert.equal(got['readFile big.bin'].stream, gitBuf(stock.bare, ['show', 'main:big.bin']).toString('base64'));
105 assert.equal(fq.treeFilter, 'tree:0');
106 assert.equal(sq.treeFilter, 'none');
107 const spans = spansOf(t.ex);
108 const probes = spans.filter(s => s.name === 'git.upload-pack discover');
109 assert.equal(probes.length, 1, 'one advertisement read for the whole sequence (one quirks record)');
110 assert.equal(probes[0].attrs['git.server.filter'], false);
111 assert.ok(!probes[0].attrs['git.server.fetch'].includes('filter'));
112 const fetches = spans.filter(s => s.name === 'git.upload-pack fetch');
113 const filtered = fetches.filter(s => s.attrs['git.fetch.filter'] !== '');
114 assert.equal(filtered.length, 1, 'the one filtered request is the one the server died on');
115 assert.equal(filtered[0].attrs['error.type'], 'protocol');
116 assert.equal(filtered[0].attrs['error.kind'], 'empty_response');
117 const learned = fetches.filter(s => s.attrs['git.fetch.filter.learned'] === true);
118 assert.equal(learned.length, 1);
119 assert.equal(learned[0].attrs['git.fetch.filter.fallback'], 'none');
120 assert.equal(learned[0].attrs['git.fetch.filter.requested'], 'tree:0');
121 for (const s of fetches.filter(x => 'git.fetch.filter.fallback' in x.attrs)) assert.equal(s.attrs['git.fetch.filter.fallback'], 'none');
122 // checkoutTree's blobs came with its unfiltered trees pack: no blob fetch of its own
123 for (const b of spans.filter(s => s.name === 'git.checkout.blobs')) assert.equal(b.attrs['git.checkout.blobs.fetches'], 0, JSON.stringify(b.attrs));
124});
126test('writes: editFile, commitChanges, pushTree, mergeBranch, rebaseBranch, cherryPick, revertCommit land the same commits; fsck --strict clean', async () => {
127 const { stock, filter } = twins();
128 const writes = async (url, quirks) => {
129 const o = () => ({ tracer: new Tracer(), quirks });
130 const out = {};
131 out.editFile = await plain(unwrap(await editFile(url, { path: 'a/b/c.txt', find: 'MARK', replace: 'EDITED', author: A, message: 'edit', time: T }, { ...o(), verify: true })));
132 out.commitChanges = await plain(unwrap(await commitChanges(url, { ref: 'refs/heads/main', changes: [{ kind: 'create', path: 'd/new.txt', content: 'new\n' }, { kind: 'rename', from: 'README.md', to: 'd/README.md' }], author: A, message: 'changes', time: T }, o())));
133 out.pushTree = await plain(unwrap(await pushTree(url, { ref: 'refs/heads/deploy', base: 'refs/heads/main', files: { 'index.html': '<h1>hi</h1>\n', 'a/b/c.txt': 'site\n' }, author: A, message: 'deploy', time: T }, o())));
134 out.pushTreeAgain = await plain(unwrap(await pushTree(url, { ref: 'refs/heads/deploy', files: { 'index.html': '<h1>hi</h1>\n', 'a/b/c.txt': 'site 2\n' }, author: A, message: 'deploy 2', time: T }, o())));
135 out.mergeBranch = await plain(unwrap(await mergeBranch(url, { ref: 'refs/heads/main', from: 'refs/heads/feat', author: A, message: 'merge feat', time: T }, o())));
136 out.rebaseBranch = await plain(unwrap(await rebaseBranch(url, { ref: 'refs/heads/feat2', onto: 'refs/heads/main', committer: A, time: T }, o())));
137 out.cherryPick = await plain(unwrap(await cherryPick(url, { ref: 'refs/heads/main', commit: seeded.feat2, committer: A, time: T }, o())));
138 out.revertCommit = await plain(unwrap(await revertCommit(url, { ref: 'refs/heads/main', commit: out.cherryPick.oid, committer: A, time: T }, o())));
139 return out;
140 };
141 const fq = {}, sq = {};
142 const want = await writes(filter.url, fq);
143 const got = await writes(stock.url, sq);
144 assert.deepEqual(got, want);
145 assert.equal(sq.treeFilter, 'none');
146 assert.equal(want.mergeBranch.outcome, 'merge');
147 assert.equal(want.rebaseBranch.outcome, 'rebase');
148 for (const ref of ['main', 'feat', 'feat2', 'deploy']) assert.equal(git(stock.bare, ['rev-parse', ref]).trim(), git(filter.bare, ['rev-parse', ref]).trim(), ref);
149 assert.equal(gitBuf(stock.bare, ['show', 'main:a/b/c.txt']).toString(), 'deep EDITED\n');
150 assert.equal(want.mergeBranch.tree, git(stock.bare, ['rev-parse', `${want.mergeBranch.oid}^{tree}`]).trim());
151 assert.deepEqual(fsckProblems(stock.bare), []);
152 assert.deepEqual(fsckProblems(filter.bare), []);
153});
155test('an advertisement in hand answers first: discover() sets the quirk, the reads that follow send no filter', async () => {
156 const { stock, filter } = twins();
157 const t = traced();
158 const tr = unwrap(createTransport(stock.url, { tracer: t.tracer }));
159 const info = unwrap(await discover(tr));
160 assert.equal(info.filter, false);
161 assert.equal(tr.quirks.treeFilter, 'none');
162 const quirks = tr.quirks;
163 const rd = unwrap(await readFile(stock.url, { ref: 'main', path: 'a/b/c.txt' }, { tracer: t.tracer, quirks }));
164 assert.equal((await drain(rd.stream)).toString(), 'deep MARK\n');
165 const fetches = spansOf(t.ex).filter(s => s.name === 'git.upload-pack fetch');
166 assert.ok(fetches.length > 0 && fetches.every(s => s.attrs['git.fetch.filter'] === ''), 'no filtered request at all');
167 assert.ok(fetches.some(s => s.attrs['git.fetch.filter.fallback'] === 'none' && s.attrs['git.fetch.filter.learned'] === false));
168 assert.equal(spansOf(t.ex).filter(s => s.name === 'git.upload-pack discover').length, 1, 'no second probe');
169 // a host that advertises filter undoes a stale 'none'; a learned blob:none is left alone (Artifacts advertises filter)
170 const back = { treeFilter: 'none' };
171 unwrap(await discover(unwrap(createTransport(filter.url, { tracer: new Tracer(), quirks: back }))));
172 assert.equal(back.treeFilter, 'tree:0');
173 const art = { treeFilter: 'blob:none' };
174 unwrap(await discover(unwrap(createTransport(filter.url, { tracer: new Tracer(), quirks: art }))));
175 assert.equal(art.treeFilter, 'blob:none');
176});
178test('limits hold on the unfiltered pack: limit_exceeded (pack bytes), never protocol; the filtered twin is under them', async () => {
179 const { stock, filter } = twins();
180 const limits = { ...DEFAULT_LIMITS, maxPackBytes: 100_000 };
181 const o = () => ({ tracer: new Tracer(), limits });
182 const small = unwrap(await readFile(filter.url, { ref: 'main', path: 'README.md' }, o()));
183 assert.equal((await drain(small.stream)).toString(), '# readme\n');
184 for (const [what, run] of [
185 ['readFile', () => readFile(stock.url, { ref: 'main', path: 'README.md' }, o())],
186 ['readCommit', () => readCommit(stock.url, { ref: 'main' }, o())],
187 ['readLog', () => readLog(stock.url, { ref: 'main', limit: 2 }, o())],
188 ['checkoutTree', () => checkoutTree(stock.url, { ref: 'main' }, o())],
189 ['editFile', () => editFile(stock.url, { path: 'a/b/c.txt', find: 'MARK', replace: 'X', author: A, message: 'm' }, o())],
190 ]) {
191 const r = await run();
192 assert.equal(r.ok, false, what);
193 assert.equal(r.error.code, 'limit_exceeded', `${what}: ${r.error.code} ${r.error.message}`);
194 assert.equal(r.error.what, 'pack bytes', what);
195 }
196 assert.equal(git(stock.bare, ['rev-parse', 'main']).trim(), seeded.main, 'nothing pushed');
197});
199test('a server that advertises filter and answers a filtered fetch with an empty body: protocol, the quirk unchanged', async () => {
200 const { filter } = twins();
201 const proxy = await startProxy(srv.url, ctx => (ctx.stage === 'fetch' && /filter /.test(ctx.reqBody.toString('latin1')) ? { type: 'bytes', noForward: true, bytes: new Uint8Array(0) } : { type: 'pass' }));
202 try {
203 const t = traced(); const quirks = {};
204 const url = `${proxy.url}/${filter.url.split('/').pop()}`;
205 const r = await readFile(url, { ref: 'main', path: 'a/b/c.txt' }, { tracer: t.tracer, quirks });
206 assert.equal(r.ok, false);
207 assert.equal(r.error.code, 'protocol');
208 assert.equal(r.error.reason, 'empty_response');
209 assert.equal(r.error.message, 'v2: response ended without flush');
210 assert.equal(quirks.treeFilter, 'tree:0');
211 const probes = spansOf(t.ex).filter(s => s.name === 'git.upload-pack discover');
212 assert.equal(probes.length, 1);
213 assert.equal(probes[0].attrs['git.server.filter'], true);
214 // an empty answer to an unfiltered request is not a reason to probe: it is the protocol error, no advertisement read
215 const t2 = traced();
216 const blob = git(filter.bare, ['rev-parse', 'main:a/b/c.txt']).trim();
217 const proxy2 = await startProxy(srv.url, ctx => (ctx.stage === 'fetch' && ctx.reqBody.length > 0 && !/command=ls-refs/.test(ctx.reqBody.toString('latin1')) ? { type: 'bytes', noForward: true, bytes: new Uint8Array(0) } : { type: 'pass' }));
218 try {
219 const tr = unwrap(createTransport(`${proxy2.url}/${filter.url.split('/').pop()}`, { tracer: t2.tracer }));
220 const { fetchObject } = await import('../src/fetch.js');
221 // (the request that carries no argument a server may refuse: a want named a blob is sent no `deepen`)
222 const { TYPE } = await import('../src/objects.js');
223 const got = await fetchObject(tr, { oid: blob, filter: '', expectType: TYPE.BLOB });
224 assert.equal(got.ok, false);
225 assert.equal(got.error.code, 'protocol');
226 assert.equal(spansOf(t2.ex).filter(s => s.name === 'git.upload-pack discover').length, 0);
227 // the same for a caller's own depth: it is sent as given and its refusal is the caller's answer
228 const own = await fetchObject(tr, { oid: blob, filter: '', deepen: 0 });
229 assert.equal(own.ok, false);
230 assert.equal(own.error.code, 'protocol');
231 assert.equal(spansOf(t2.ex).filter(s => s.name === 'git.upload-pack discover').length, 0);
232 // A want of unknown type is sent `deepen 1` by default (fetchobject-deepen.test.js), an argument a server may not
233 // take: its empty answer reads the advertisement, once per quirks record. It lists `shallow`, so the answer is
234 // still the protocol error, and the next empty answer reads nothing.
235 const typeless = await fetchObject(tr, { oid: blob, filter: '' });
236 assert.equal(typeless.ok, false);
237 assert.equal(typeless.error.code, 'protocol');
238 assert.equal(typeless.error.reason, 'empty_response');
239 const probes2 = spansOf(t2.ex).filter(s => s.name === 'git.upload-pack discover');
240 assert.equal(probes2.length, 1);
241 assert.equal(probes2[0].attrs['git.server.shallow'], true);
242 const again = await fetchObject(tr, { oid: blob, filter: '' });
243 assert.equal(again.ok, false);
244 assert.equal(again.error.code, 'protocol');
245 assert.equal(spansOf(t2.ex).filter(s => s.name === 'git.upload-pack discover').length, 1);
246 } finally { await proxy2.close(); }
247 } finally { await proxy.close(); }
248});
250test('an advertisement the probe cannot read (cut inside a pkt) decides nothing: the empty response stays protocol', async () => {
251 const { stock } = twins();
252 // GET info/refs (no request body) loses its last two bytes, inside the closing flush; the fetch is the stock server's own
253 const proxy = await startProxy(srv.url, ctx => (ctx.reqBody.length === 0 && ctx.bytes.length > 0 ? { type: 'bytes', bytes: ctx.bytes.subarray(0, ctx.bytes.length - 2) } : { type: 'pass' }));
254 try {
255 const t = traced(); const quirks = {};
256 const r = await readFile(`${proxy.url}/${stock.url.split('/').pop()}`, { ref: 'main', path: 'a/b/c.txt' }, { tracer: t.tracer, quirks });
257 assert.equal(r.ok, false);
258 assert.equal(r.error.code, 'protocol');
259 assert.equal(r.error.reason, 'empty_response');
260 assert.equal(quirks.treeFilter, 'tree:0', 'nothing learned');
261 const probe = spansOf(t.ex).filter(s => s.name === 'git.upload-pack discover');
262 assert.equal(probe.length, 1);
263 assert.equal(probe[0].attrs['error.type'], 'protocol');
264 assert.equal(probe[0].status.message, 'trailing 2 bytes after last pkt-line');
265 } finally { await proxy.close(); }
266});
268// #136: with no quirks passed, the no-filter learning is remembered per remote too: across any order of
269// edit/read/checkout/log/merge, at most one filtered request (the one the stock server dies on: empty_response) and one
270// advertisement probe per remote. Counted at the fetchImpl. A fresh `quirks: {}` per call (ply before #136) pays per call.
271const OPS = ['edit', 'read', 'checkout', 'log', 'merge'];
272const orders = [...OPS.map((_, i) => [...OPS.slice(i), ...OPS.slice(0, i)]), [...OPS].reverse()];
273async function sweep(order, perCall) {
274 const { stock } = twins();
275 let filtered = 0, probes = 0;
276 const fetchImpl = (url, init) => {
277 const u = String(url);
278 if (u.endsWith('/git-upload-pack') && init?.body && Buffer.from(init.body).toString('latin1').includes('filter ')) filtered++;
279 if (u.includes('/info/refs?service=git-upload-pack')) probes++;
280 return globalThis.fetch(url, init);
281 };
282 const ex = arrayExporter();
283 const o = () => ({ tracer: new Tracer({ exporter: ex }), fetchImpl, ...(perCall ? { quirks: {} } : {}) });
284 const run = {
285 edit: async () => unwrap(await editFile(stock.url, { path: 'a/b/c.txt', find: 'MARK', replace: 'EDITED', author: A, message: 'edit', time: T }, { ...o(), verify: true })),
286 read: async () => drain(unwrap(await readFile(stock.url, { path: 'big.bin' }, o())).stream),
287 checkout: async () => plain(unwrap(await checkoutTree(stock.url, { ref: 'main' }, o()))),
288 log: async () => unwrap(await readLog(stock.url, { ref: 'main', limit: 3 }, o())),
289 merge: async () => unwrap(await mergeBranch(stock.url, { ref: 'refs/heads/main', from: 'refs/heads/feat', author: A, message: 'merge feat', time: T }, o())),
290 };
291 for (const op of order) await run[op]();
292 assert.deepEqual(fsckProblems(stock.bare), []);
293 const empties = spansOf(ex).filter(s => s.name === 'git.upload-pack fetch' && s.attrs['error.kind'] === 'empty_response').length;
294 return { filtered, probes, empties };
296test('#136: no quirks passed, any order: one empty_response and one advertisement probe per stock remote', async () => {
297 forgetQuirks();
298 for (const order of orders) {
299 const { filtered, probes, empties } = await sweep(order, false);
300 assert.equal(filtered, 1, `${order}: one filtered request`);
301 assert.equal(empties, 1, `${order}: one empty_response`);
302 assert.equal(probes, 1, `${order}: one advertisement read`);
303 }
304 const before = await sweep(OPS, true);
305 assert.ok(before.empties >= 4 && before.probes === before.empties, JSON.stringify(before));
306});
Diagnostics4 git calls · 253 ms
CallStatusSizeTime0253 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200145 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=145
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=145
git.pkt.payload.max=76
git.ls_refs.count=2
git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020038 KiB · hit2 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=38434
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
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=6
git.pkt.data=4
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=38434
git.pkt.payload.max=38339
git.sideband.band1.bytes=38338
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=63
git.pack.bytes=38338
git.pack.ofs_delta=0
git.pack.ref_delta=8
git.pack.chain.max=8
git.pack.trailer=0bc36ab7adf82d3109177f11f1ea93f1ce071f77
git.pack.full=55
Open pack map
fetch2005.9 KiB248 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=248
git.response.bytes=6035
git.response.cache=MISS
git.response.duration_ms=248
git.fetch.wants=7ab78a1ae0d76cba4e67bfecb8cb5a5bf059f550
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=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=6035
git.pkt.payload.max=6014
git.sideband.band1.bytes=6013
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://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/ply.git
Ref
refs/heads/main
Commit
19912563f540228593df0c489082e5e2508e21e4
cf-ray
a5e2d8a8fe1a14c2
Request
379ad01b…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format