Artifactspublic-v0

ply

main
ply4 git calls439 ms44 KiB2 cachedprotocol v2
355 lines20 KiBRaw
1// pushRepo (ply/repo-node) against the local file system's own edges: what it reads from `.git` is bounded by the
2// limits, and a file system failure is a coded Err. node:fs/promises is wrapped so every read's size is counted: the
3// proof of a bound is the largest single read of a file, never the process's RSS.
4import { test, vi, beforeAll as before, afterAll as after } from 'vitest';
5import assert from 'node:assert/strict';
6import { join } from 'node:path';
7import { randomBytes } from 'node:crypto';
8import { appendFileSync, mkdirSync, writeFileSync, readdirSync, statSync, truncateSync, chmodSync } from 'node:fs';
9import { git, tmpRoot, makeBareRepo, startGitServer } from './server.js';
10import { pushRepo } from '../src/repo-node.js';
11import { withLimits } from '../src/limits.js';
12import { constants } from 'node:buffer';
14// every read through node:fs/promises, as { path, bytes }: readFile (whole) and FileHandle.read / readFile
15const reads = vi.hoisted(() => ({ log: [], statSize: new Map() }));
16vi.mock('node:fs/promises', async importOriginal => {
17 const real = await importOriginal();
18 const note = (path, bytes) => { reads.log.push({ path: String(path), bytes }); };
19 return {
20 ...real,
21 readFile: async (path, ...rest) => { const b = await real.readFile(path, ...rest); note(path, b.length); return b; },
22 open: async (path, ...rest) => {
23 const fh = await real.open(path, ...rest);
24 const read = fh.read.bind(fh);
25 const readAll = fh.readFile.bind(fh);
26 const stat = fh.stat.bind(fh);
27 // a size the file system reports for this path (a test double: a file of that size cannot be made everywhere)
28 fh.stat = async (...a) => { const st = await stat(...a); const size = reads.statSize.get(String(path)); if (size !== undefined) st.size = size; return st; };
29 fh.read = async (...a) => { const r = await read(...a); note(path, r.bytesRead); return r; };
30 fh.readFile = async (...a) => { const b = await readAll(...a); note(path, b.length); return b; };
31 return fh;
32 },
33 };
34});
36const MIB = 1024 * 1024;
37let root, cleanup, srv, n = 0;
38before(async () => { ({ root, cleanup } = tmpRoot()); srv = await startGitServer(root); });
39after(async () => { await srv.close(); cleanup(); });
41const ID = ['-c', 'user.name=Local', '-c', 'user.email=local@example.com'];
42const remoteRepo = () => { const name = `fs${n++}`; makeBareRepo(root, name); return `${srv.url}/${name}.git`; };
43// a work tree with one commit on main, its objects in one pack (git gc)
44const localRepo = () => {
45 const dir = join(root, `local${n++}`);
46 mkdirSync(dir);
47 git(dir, ['init', '-q', '-b', 'main']);
48 writeFileSync(join(dir, 'a.txt'), 'a\n');
49 git(dir, ['add', '-A']);
50 git(dir, [...ID, 'commit', '-q', '-m', 'one']);
51 git(dir, ['gc', '-q']);
52 return dir;
53};
54const packDir = dir => join(dir, '.git', 'objects', 'pack');
55const largestRead = path => Math.max(0, ...reads.log.filter(r => r.path === path).map(r => r.bytes));
56const totalRead = path => reads.log.filter(r => r.path === path).reduce((sum, r) => sum + r.bytes, 0);
58test('a local pack is read under maxPackBytes: one past the bound is limit_exceeded and no read of it is larger than the bound', async () => {
59 const dir = localRepo();
60 const url = remoteRepo();
61 const [real] = readdirSync(packDir(dir)).filter(f => f.endsWith('.pack'));
62 const realPath = join(packDir(dir), real);
64 // the counter sees the pack's reads: a push that succeeds read exactly the file's bytes (statSync), in reads no
65 // larger than the file
66 reads.log.length = 0;
67 const fine = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true });
68 assert.equal(fine.ok, true);
69 assert.equal(totalRead(realPath), statSync(realPath).size, 'the wrapped fs counted the pack read');
71 // 64 MiB of zeros (sparse) beside it, every limit a pack could be held to at 1 MiB
72 const big = join(packDir(dir), 'pack-big.pack');
73 writeFileSync(big, '');
74 truncateSync(big, 64 * MIB);
75 reads.log.length = 0;
76 const limits = withLimits({ maxPackBytes: MIB, maxInflatedTotal: MIB, maxObjectSize: MIB });
77 const r = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true }, { limits });
78 assert.equal(r.ok, false);
79 assert.equal(r.error.code, 'limit_exceeded');
80 assert.equal(r.error.what, 'local pack bytes');
81 assert.equal(r.error.got, 64 * MIB);
82 assert.equal(r.error.max, MIB);
83 assert.ok(largestRead(big) <= MIB, `largest single read of the 64 MiB pack: ${largestRead(big)} bytes, the bound is ${MIB}`);
85 // 3 GiB (sparse), past what one Buffer read takes (node: ERR_FS_FILE_TOO_LARGE above 2 GiB), under the defaults:
86 // a coded refusal, not a rejection
87 truncateSync(big, 3 * 1024 * MIB);
88 reads.log.length = 0;
89 const huge = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true });
90 assert.equal(huge.ok, false);
91 assert.equal(huge.error.code, 'limit_exceeded');
92 assert.equal(huge.error.what, 'local pack bytes');
93 assert.equal(largestRead(big), 0, 'nothing of a pack past the bound is read');
94});
96test.skipIf(process.getuid?.() === 0)('a pack the process cannot read is a coded Err naming the file and the operation, never a rejection', async () => {
97 const dir = localRepo();
98 const url = remoteRepo();
99 const [real] = readdirSync(packDir(dir)).filter(f => f.endsWith('.pack'));
100 const path = join(packDir(dir), real);
101 chmodSync(path, 0o000);
102 try {
103 const r = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true });
104 assert.equal(r.ok, false);
105 assert.equal(r.error.code, 'unsupported');
106 assert.equal(r.error.kind, 'filesystem');
107 assert.equal(r.error.what, 'local pack');
108 assert.equal(r.error.path, path);
109 assert.equal(r.error.cause.code, 'EACCES');
110 assert.match(r.error.message, /EACCES/u);
111 assert.match(r.error.message, /open|read/u);
112 } finally { chmodSync(path, 0o644); }
113});
115// The boundary cells of maxPackBytes, on real packs. The bound holds two sizes: the local pack read from `.git` ('local
116// pack bytes', the file git wrote) and the pack the push builds ('push pack bytes', ply's own deflate and deltas).
117// Neither is always the larger: git and node link different zlibs, and for the same objects their streams differ by a
118// byte either way with the commit's timestamp (git 2.50 / macOS, a.txt + one commit: local 198, push 199 at
119// 1700003637 +0000; local 199, push 198 at 1700014548 +0000), so a pack of exactly the local size need not push.
120// The oracles: statSync for the local size, ply's own refusal at that bound for the push size when it is the larger,
121// and git rev-parse on the remote for a push that lands. Both boundary pairs are checked whichever binds:
122// local - 1: refused reading the file, got = local, max = local - 1
123// local: lands (the local pack binds) or is refused building the push, got = push > local, max = local;
124// then push - 1 refuses with got = push, max = push - 1, and push lands (the push pack binds)
125const remoteDirOf = url => join(root, url.slice(srv.url.length + 1));
126const packBoundary = async dir => {
127 const url = remoteRepo();
128 const packs = readdirSync(packDir(dir)).filter(f => f.endsWith('.pack'));
129 assert.equal(packs.length, 1, 'one local pack');
130 const local = statSync(join(packDir(dir), packs[0])).size;
131 const at = maxPackBytes => pushRepo(dir, url, { refspecs: ['main'] }, { limits: withLimits({ maxPackBytes }) });
132 const refused = (r, what, got, max) => {
133 assert.equal(r.ok, false, `refused at ${max}`);
134 assert.equal(r.error.code, 'limit_exceeded', `${r.error.code}: ${r.error.message}`);
135 assert.equal(r.error.what, what);
136 assert.equal(r.error.got, got);
137 assert.equal(r.error.max, max);
138 };
139 const landed = r => {
140 assert.equal(r.ok, true, r.ok ? '' : `${r.error.code}: ${r.error.message}`);
141 assert.equal(git(remoteDirOf(url), ['rev-parse', 'refs/heads/main']).trim(), git(dir, ['rev-parse', 'main']).trim());
142 };
143 refused(await at(local - 1), 'local pack bytes', local, local - 1);
144 const atLocal = await at(local);
145 if (atLocal.ok) { landed(atLocal); return { binding: 'local', local, push: null }; }
146 assert.equal(atLocal.error.what, 'push pack bytes', `at the local size (${local}) only the push pack can be over: ${atLocal.error.message}`);
147 const push = atLocal.error.got;
148 assert.ok(push > local, `the push pack (${push}) is larger than the local pack (${local})`);
149 refused(atLocal, 'push pack bytes', push, local);
150 refused(await at(push - 1), 'push pack bytes', push, push - 1);
151 landed(await at(push));
152 return { binding: 'push', local, push };
153};
155test('the maxPackBytes boundary on git gc\'s pack of one commit: exactly the larger of the local and push packs pushes, one byte less refuses naming it', async () => {
156 const { binding } = await packBoundary(localRepo());
157 assert.ok(binding === 'local' || binding === 'push');
158});
160// the local pack binds, whatever the zlibs: git stores it (pack.compression=0) and the push deflates 64 KiB of one byte
161test('the maxPackBytes boundary where the local pack is the larger (stored by git): exactly its size pushes, one byte less refuses reading it', async () => {
162 const dir = localRepo();
163 writeFileSync(join(dir, 'z.txt'), 'z'.repeat(64 * 1024));
164 git(dir, ['add', '-A']);
165 git(dir, [...ID, 'commit', '-q', '-m', 'zeros']);
166 git(dir, ['-c', 'pack.compression=0', 'repack', '-adfq']);
167 const { binding, local } = await packBoundary(dir);
168 assert.equal(binding, 'local', `local pack ${local} bytes`);
169});
171// the push pack binds, whatever the zlibs: git deltas one 64 KiB random file against its copy at another path, which
172// ply does not (it deltas by path), so ply's pack holds both whole and git's one
173test('the maxPackBytes boundary where the push pack is the larger (git deltas across paths): exactly its size pushes, one byte less refuses building it', async () => {
174 const dir = localRepo();
175 const body = randomBytes(32 * 1024).toString('hex');
176 writeFileSync(join(dir, 'one.txt'), body);
177 writeFileSync(join(dir, 'two.txt'), `${body}x\n`);
178 git(dir, ['add', '-A']);
179 git(dir, [...ID, 'commit', '-q', '-m', 'copies']);
180 git(dir, ['repack', '-adfq']);
181 const { binding, local, push } = await packBoundary(dir);
182 assert.equal(binding, 'push', `local pack ${local} bytes, push pack ${push}`);
183});
185// node's fs binding takes a read's length as an int32 and aborts the process on more (node_file.cc, fs.Read:
186// `args[3]->IsInt32()`, SIGABRT), so a caller who raises maxPackBytes past 2 GiB for a pack of 2^31 bytes or more must
187// still get an answer. The expected values are hand-derived: the file is 2 GiB + 1 zeros (truncate), which is not a
188// pack ('PACK' is 50 41 43 4b), so the answer is pack_corrupt; every byte was read (the sum equals the truncate
189// size), and no single read was asked for more than 1 GiB (2^30).
190test('a local pack of 2 GiB or more under a raised maxPackBytes is read in pieces of at most 1 GiB: an answer, never a process abort', async () => {
191 const GIB = 1024 * MIB;
192 const dir = localRepo();
193 const url = remoteRepo();
194 const big = join(packDir(dir), 'pack-big.pack');
195 writeFileSync(big, '');
196 truncateSync(big, 2 * GIB + 1);
197 reads.log.length = 0;
198 const r = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxPackBytes: 4 * GIB }) });
199 truncateSync(big, 0);
200 assert.equal(r.ok, false);
201 assert.equal(r.error.code, 'pack_corrupt');
202 assert.equal(totalRead(big), 2 * GIB + 1, 'the whole file was read');
203 assert.ok(largestRead(big) <= GIB, `largest single read: ${largestRead(big)} bytes, the cap is ${GIB}`);
204 assert.ok(reads.log.filter(x => x.path === big).length >= 3, 'more than two reads were needed for 2 GiB + 1 at 1 GiB each');
205});
207// ---- every other whole-file read of `.git` is bounded before a byte is read (review R3) ----
208// Each case puts a 64 MiB sparse file (truncate: all zeros, no disk) where pushRepo reads a small one, with the limit
209// that bounds it at 1 MiB (or the fixed one-line bound). The expected values are hand-derived, none from the code
210// under test: `got` is the truncate size, `max` is the limit passed in (or 65 520, the pkt-line maximum of
211// gitprotocol-common that README.md documents as the bound of a one-line file), and the proof that the bound came
212// first is the read log: no read of the file returned a byte.
213const BIG = 64 * MIB;
214const PKT_LINE_MAX = 65520;
215const refusedUnread = (r, path, what, max) => {
216 assert.equal(r.ok, false);
217 assert.equal(r.error.code, 'limit_exceeded', `${r.error.code}: ${r.error.message}`);
218 assert.equal(r.error.what, what);
219 assert.equal(r.error.got, BIG);
220 assert.equal(r.error.max, max);
221 assert.equal(largestRead(path), 0, 'no byte of the oversize file was read');
222};
224test('packed-refs past maxLsRefsBytes is limit_exceeded before a byte of it is read', async () => {
225 const dir = localRepo();
226 const path = join(dir, '.git', 'packed-refs');
227 truncateSync(path, BIG);
228 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxLsRefsBytes: MIB }) });
229 refusedUnread(r, path, 'local packed-refs bytes', MIB);
230});
232test('config past maxLsRefsBytes is limit_exceeded before a byte of it is read', async () => {
233 const dir = localRepo();
234 const path = join(dir, '.git', 'config');
235 truncateSync(path, BIG);
236 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxLsRefsBytes: MIB }) });
237 refusedUnread(r, path, 'local config bytes', MIB);
238});
240test('a loose ref file past the one-line bound (65 520 bytes) is limit_exceeded before a byte of it is read', async () => {
241 const dir = localRepo();
242 const path = join(dir, '.git', 'refs', 'heads', 'huge');
243 writeFileSync(path, '');
244 truncateSync(path, BIG);
245 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true });
246 refusedUnread(r, path, 'local ref file bytes', PKT_LINE_MAX);
247});
249test('HEAD past the one-line bound (65 520 bytes) is limit_exceeded before a byte of it is read', async () => {
250 const dir = localRepo();
251 const path = join(dir, '.git', 'HEAD');
252 truncateSync(path, BIG);
253 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true });
254 refusedUnread(r, path, 'local HEAD bytes', PKT_LINE_MAX);
255});
257// The loose object's bound is derived from maxObjectSize: no zlib stream of an object within a 1 MiB limit is as long
258// as 64 MiB, so the file is refused from its size. `max` is asserted only against what must hold whatever the formula:
259// at least the object limit (a stored stream is longer than its object) and under the file's size.
260test('a loose object file past the bound maxObjectSize gives it is limit_exceeded before a byte of it is read', async () => {
261 const dir = localRepo();
262 writeFileSync(join(dir, 'b.txt'), 'b\n');
263 git(dir, ['add', '-A']);
264 git(dir, [...ID, 'commit', '-q', '-m', 'two']);
265 const oid = git(dir, ['rev-parse', 'HEAD']).trim();
266 const path = join(dir, '.git', 'objects', oid.slice(0, 2), oid.slice(2));
267 chmodSync(path, 0o644);
268 truncateSync(path, BIG);
269 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxObjectSize: MIB, maxInflatedTotal: 4 * MIB }) });
270 assert.equal(r.ok, false);
271 assert.equal(r.error.code, 'limit_exceeded', `${r.error.code}: ${r.error.message}`);
272 assert.equal(r.error.what, 'local loose object bytes');
273 assert.equal(r.error.got, BIG);
274 assert.ok(r.error.max >= MIB && r.error.max < BIG, `max ${r.error.max}`);
275 assert.equal(largestRead(path), 0, 'no byte of the oversize file was read');
276});
278// The other side of that bound, with git as the writer: a blob of exactly maxObjectSize random bytes stored by git
279// with core.compression=0 (stored deflate blocks: the longest stream zlib writes for it, longer than the blob) is a
280// loose file larger than maxObjectSize, and it must still be read and pushed. The oracle is git on the remote.
281test('a loose object of exactly maxObjectSize, stored uncompressed by git (file larger than the object), is read and pushes', async () => {
282 const dir = localRepo();
283 const url = remoteRepo();
284 git(dir, ['config', 'core.compression', '0']);
285 writeFileSync(join(dir, 'r.bin'), randomBytes(MIB));
286 git(dir, ['add', '-A']);
287 git(dir, [...ID, 'commit', '-q', '-m', 'random']);
288 const blob = git(dir, ['rev-parse', 'HEAD:r.bin']).trim();
289 const size = statSync(join(dir, '.git', 'objects', blob.slice(0, 2), blob.slice(2))).size;
290 assert.ok(size > MIB, `the loose file (${size}) is larger than the object`);
291 const r = await pushRepo(dir, url, { refspecs: ['main'] }, { limits: withLimits({ maxObjectSize: MIB }) });
292 assert.equal(r.ok, true, r.ok ? '' : `${r.error.code}: ${r.error.message}`);
293 const remoteDir = join(root, `${url.slice(srv.url.length + 1)}`);
294 assert.equal(git(remoteDir, ['rev-parse', 'refs/heads/main']).trim(), git(dir, ['rev-parse', 'main']).trim());
295 assert.equal(git(remoteDir, ['cat-file', '-s', blob]).trim(), String(MIB));
296});
298// The boundary cells of the text bound, on git's own config (read first, and padded here to be larger than this
299// repository's packed-refs, which the same limit bounds): at exactly its statSync size it is read (the dry run resolves
300// main); with one byte less of limit the refusal carries got = size, max = size - 1. The padding is a comment line sized
301// from packed-refs, because what git init writes varies by platform: on macOS it adds core.ignorecase and
302// core.precomposeunicode (137 bytes, over packed-refs' 103), on Linux it does not (92 bytes, under it).
303test('the config boundary: a file of exactly maxLsRefsBytes is read; one byte less of bound refuses with got = size, max = size - 1', async () => {
304 const dir = localRepo();
305 const url = remoteRepo();
306 const configPath = join(dir, '.git', 'config');
307 const packedRefs = statSync(join(dir, '.git', 'packed-refs')).size;
308 appendFileSync(configPath, `#${'x'.repeat(packedRefs)}\n`);
309 const size = statSync(configPath).size;
310 assert.ok(statSync(join(dir, '.git', 'packed-refs')).size <= size, 'packed-refs is within the same bound');
311 const under = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxLsRefsBytes: size - 1 }) });
312 assert.equal(under.ok, false);
313 assert.equal(under.error.code, 'limit_exceeded');
314 assert.equal(under.error.what, 'local config bytes');
315 assert.equal(under.error.got, size);
316 assert.equal(under.error.max, size - 1);
317 const exact = await pushRepo(dir, url, { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxLsRefsBytes: size }) });
318 assert.equal(exact.ok, true, exact.ok ? '' : `${exact.error.code}: ${exact.error.message}`);
319});
321// ---- a file within the bound that the runtime cannot hold is limit_exceeded, never a throw ----
322// Hand-derived expected values: `got` is the size the file system reports (the stat double, or the truncate size),
323// `max` the limit passed in, `what` '<what> buffer bytes' as README states for these two cases.
324test('a local pack within a raised maxPackBytes that no buffer can hold (1 PiB reported by stat) is limit_exceeded, no byte read', async () => {
325 const PIB = 2 ** 50;
326 assert.throws(() => new Uint8Array(PIB), RangeError, 'precondition: this runtime has no 1 PiB buffer');
327 const dir = localRepo();
328 const big = join(packDir(dir), 'pack-big.pack');
329 writeFileSync(big, '');
330 reads.statSize.set(big, PIB);
331 reads.log.length = 0;
332 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxPackBytes: 2 * PIB }) });
333 reads.statSize.delete(big);
334 assert.equal(r.ok, false);
335 assert.equal(r.error.code, 'limit_exceeded', `${r.error.code}: ${r.error.message}`);
336 assert.equal(r.error.what, 'local pack buffer bytes');
337 assert.equal(r.error.got, PIB);
338 assert.equal(r.error.max, 2 * PIB);
339 assert.equal(largestRead(big), 0, 'no byte of the file was read');
340});
342test('a config within a raised maxLsRefsBytes but longer than the longest string the runtime makes is limit_exceeded', async () => {
343 const SIZE = 640 * MIB;
344 assert.ok(SIZE > constants.MAX_STRING_LENGTH, `precondition: ${SIZE} bytes of NUL is more UTF-16 units than ${constants.MAX_STRING_LENGTH}`);
345 const dir = localRepo();
346 const path = join(dir, '.git', 'config');
347 truncateSync(path, SIZE);
348 const r = await pushRepo(dir, remoteRepo(), { refspecs: ['main'], dryRun: true }, { limits: withLimits({ maxLsRefsBytes: 1024 * MIB }) });
349 truncateSync(path, 0);
350 assert.equal(r.ok, false);
351 assert.equal(r.error.code, 'limit_exceeded', `${r.error.code}: ${r.error.message}`);
352 assert.equal(r.error.what, 'local config buffer bytes');
353 assert.equal(r.error.got, SIZE);
354 assert.equal(r.error.max, 1024 * MIB);
355});
Diagnostics4 git calls · 439 ms
CallStatusSizeTime0439 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
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 · 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=145
git.response.cache=HIT
git.response.duration_ms=2
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 · hit7 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=430
git.response.bytes=38434
git.response.cache=HIT
git.response.duration_ms=7
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.7 KiB430 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=5863
git.response.cache=MISS
git.response.duration_ms=430
git.fetch.wants=4dadbc641cac5fb8ff9164a23ca3d6b93ce98d87
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=5863
git.pkt.payload.max=5842
git.sideband.band1.bytes=5841
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
a5e3422b2cfd6e2a
Request
b515cd5d…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format