GitHubivarvong
ply
main
1// Header-level mutations of commits, tags, and trees. ply may reject an object git accepts — duplicate
2// single-valued headers and orders commit-tree would not write are illegal here on purpose, and fsck is
3// looser. If ply parses the object, every field git exposes has to match.
4//
5// A rejection is judged too, never by ply: git's own strict object check (hash-object without --literally)
6// either refuses the object as well, or ply is stricter and the object's text has to show one of the rules
7// named in stricterRule below. A rejection git does not share and no named rule explains is a failure, and
8// so is a run in which nothing was accepted (a parser that refuses everything).
9//
10// node test/fuzz/git-semantic.mjs [--n 20] [--seed 1] [--case <seed>]
11import { spawnSync } from 'node:child_process';
12import { mkdtempSync, rmSync } from 'node:fs';
13import { tmpdir } from 'node:os';
14import { join } from 'node:path';
15import { concat, te } from '../../src/bytes.js';
16import { fromHex } from '../../src/sha1.js';
17import { hashObject, parseCommit, parseTag, parseTree, encodeCommit, encodeTag, ident } from '../../src/objects.js';
18import { validateIdent } from '../../src/validate.js';
19import { Rng } from './prng.js';
20import { unwrap } from '../unwrap.js';
22const args = Object.fromEntries(process.argv.slice(2).map((a, i, arr) => a.startsWith('--') ? [a.slice(2), arr[i + 1] && !arr[i + 1].startsWith('--') ? arr[i + 1] : true] : []).filter(x => x.length));
23const N = parseInt(args.n ?? '20', 10);
24const SEED = parseInt(args.seed ?? '1', 10);
25const ONLY = args.case && args.case !== true ? String(args.case) : null;
26const env = {
27 ...process.env,
28 GIT_CONFIG_COUNT: '1', GIT_CONFIG_KEY_0: 'commit.gpgsign', GIT_CONFIG_VALUE_0: 'false',
29 GIT_AUTHOR_NAME: 'A', GIT_AUTHOR_EMAIL: 'a@b.c', GIT_COMMITTER_NAME: 'C', GIT_COMMITTER_EMAIL: 'c@b.c',
30};
31const AUTHOR = unwrap(ident(unwrap(validateIdent({ name: 'A', email: 'a@b.c', time: 1700000000 }))));
32const COMMITTER = unwrap(ident(unwrap(validateIdent({ name: 'C', email: 'c@b.c', time: 1700000001 }))));
34function git(dir, argv, input) {
35 const r = spawnSync('git', ['-C', dir, ...argv], { input, encoding: 'utf8', env });
36 return { code: r.status ?? 1, out: `${r.stdout ?? ''}`, err: `${r.stderr ?? ''}` };
37}
39const dir = mkdtempSync(join(tmpdir(), 'ply-sem-'));
40const init = git(dir, ['init', '-q', '-b', 'main']);
41if (init.code !== 0) { console.error(init.err); process.exit(1); }
42const empty = git(dir, ['hash-object', '-t', 'tree', '-w', '--stdin'], '').out.trim();
43const blob = git(dir, ['hash-object', '-w', '--stdin'], 'hello\n').out.trim();
44const treeBytes = concat([te.encode(`100644 a\0`), fromHex(blob), te.encode(`40000 d\0`), fromHex(empty)]);
45const treeOid = git(dir, ['hash-object', '-t', 'tree', '-w', '--stdin', '--literally'], Buffer.from(treeBytes)).out.trim();
46const commitText = `tree ${empty}\nauthor ${AUTHOR}\ncommitter ${COMMITTER}\n\nmsg\n`;
47const commitOid = git(dir, ['hash-object', '-t', 'commit', '-w', '--stdin', '--literally'], commitText).out.trim();
48const TREES = [empty, treeOid];
49const COMMITS = [commitOid];
50const OBJECTS = [
51 { oid: commitOid, type: 'commit' },
52 { oid: treeOid, type: 'tree' },
53 { oid: empty, type: 'tree' },
54 { oid: blob, type: 'blob' },
55];
57function literally(type, data) {
58 const input = typeof data === 'string' ? data : Buffer.from(data);
59 const r = git(dir, ['hash-object', '-t', type, '-w', '--stdin', '--literally'], input);
60 if (r.code !== 0) throw new Error(`hash-object ${type}: ${r.err}`);
61 const oid = r.out.trim().split('\n').pop();
62 const ours = hashObject(type, typeof data === 'string' ? te.encode(data) : data);
63 if (ours !== oid) throw new Error(`hash diverged ${type}: ply ${ours} git ${oid}`);
64 return oid;
65}
67function parseOrThrow(type, data) {
68 const bytes = typeof data === 'string' ? te.encode(data) : data;
69 if (type === 'commit') return unwrap(parseCommit(bytes));
70 if (type === 'tag') return unwrap(parseTag(bytes));
71 return unwrap(parseTree(bytes));
72}
74function norm(s) { return (s ?? '').replace(/\n+$/, ''); }
76// git's verdict on one object, without storing it: hash-object without --literally runs fsck's per-object
77// checks in strict mode (object-file.c: index_mem → fsck_buffer with FSCK_OPTIONS_STRICT). null when git
78// takes the object, else git's first message.
79function gitRefusal(type, data) {
80 const r = git(dir, ['hash-object', '-t', type, '--stdin'], typeof data === 'string' ? data : Buffer.from(data));
81 return r.code === 0 ? null : (r.err.trim().split('\n')[0] || `exit ${r.code}`);
82}
84// The enumerated rules by which ply is stricter than fsck --strict, each read off the object's own text
85// (no ply code). fsck stops reading a commit's headers after `committer` and a tag's after `tagger` (or
86// after `tag` when there is no tagger); what follows is the extra-header region, which fsck does not check.
87// shadowed-header a line there starts with a key whose only legal place is the fixed prefix
88// (commit: tree, parent, author, committer; tag: object, type, tag, tagger)
89// duplicate-encoding a commit carries more than one `encoding` header
90// Continuation lines start with a space and so never match. A tree has no such rule: fsck --strict already
91// refuses everything parseTree refuses.
92// Only called for an object git's strict check accepted, so the fixed prefix is known to be well formed.
93function stricterRule(type, data) {
94 if (type === 'tree') return null;
95 const text = typeof data === 'string' ? data : Buffer.from(data).toString('latin1');
96 const end = text.indexOf('\n\n');
97 const lines = (end < 0 ? text : text.slice(0, end)).split('\n');
98 const from = type === 'commit' ? lines.findIndex(l => l.startsWith('committer ')) + 1 : lines[3]?.startsWith('tagger ') ? 4 : 3;
99 const extra = lines.slice(from);
100 const fixed = type === 'commit' ? ['tree', 'parent', 'author', 'committer'] : ['object', 'type', 'tag', 'tagger'];
101 if (extra.some(l => fixed.some(k => l.startsWith(`${k} `)))) return 'shadowed-header';
102 if (type === 'commit' && extra.filter(l => l.startsWith('encoding ')).length > 1) return 'duplicate-encoding';
103 return null;
104}
106function agreeCommit(oid, parsed) {
107 const r = git(dir, ['log', '-1', '--no-walk', '--date=raw', '--format=%T%x00%P%x00%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%e%x00%B', oid]);
108 if (r.code !== 0) return `git rejected the commit (${r.err.trim().split('\n')[0]})`;
109 const [tree, parents, an, ae, ad, cn, ce, cd, encoding, message] = r.out.split('\0');
110 const identLine = (name, email, date) => (name === '' && email === '' && date === '' ? null : `${name} <${email}> ${date}`);
111 if (parsed.tree !== tree) return `tree ply ${parsed.tree} git ${tree}`;
112 if ((parsed.parents ?? []).join(' ') !== parents) return `parents ply ${parsed.parents} git ${parents}`;
113 if ((parsed.author ?? null) !== identLine(an, ae, ad)) return `author ply ${parsed.author} git ${identLine(an, ae, ad)}`;
114 if ((parsed.committer ?? null) !== identLine(cn, ce, cd)) return `committer ply ${parsed.committer} git ${identLine(cn, ce, cd)}`;
115 if ((parsed.encoding ?? '') !== encoding) return `encoding ply ${parsed.encoding} git ${encoding}`;
116 if (norm(parsed.message) !== norm(message)) return `message ply ${JSON.stringify(parsed.message)} git ${JSON.stringify(message)}`;
117 return null;
118}
120function agreeTag(oid, parsed) {
121 const ref = `refs/tags/sem-${oid.slice(0, 12)}`;
122 const up = git(dir, ['update-ref', ref, oid]);
123 if (up.code !== 0) return `git rejected the tag (${up.err.trim().split('\n')[0]})`;
124 const sep = '\x1f';
125 const r = git(dir, ['for-each-ref', `--format=%(tag)${sep}%(*objectname)${sep}%(tagger)${sep}%(contents)`, ref]);
126 if (r.code !== 0) return `git rejected the tag (${r.err.trim().split('\n')[0]})`;
127 const [tag, object, tagger, contents] = r.out.split('\x1f');
128 const same = (ply, gitField) => (ply ?? '') === gitField;
129 if (!same(parsed.tag, tag)) return `tag ply ${parsed.tag} git ${tag}`;
130 if (!same(parsed.object, object)) return `object ply ${parsed.object} git ${object}`;
131 if (!same(parsed.tagger, tagger)) return `tagger ply ${JSON.stringify(parsed.tagger)} git ${JSON.stringify(tagger)}`;
132 if (norm(parsed.message) !== norm(contents)) return `message ply ${JSON.stringify(parsed.message)} git ${JSON.stringify(contents)}`;
133 return null;
134}
136// ls-tree prints the mode git will use, not the raw bytes. A regular-file mode keeps only the executable bit
137// (100664 is shown as 100644). That normalization is deliberate in parseTree; compare the canonical mode.
138function canonicalMode(mode) {
139 const text = String(mode).replace(/^0+/, '') || '0';
140 const n = parseInt(text, 8);
141 const type = n & 0o170000;
142 if (type === 0o100000) return (n & 0o111) ? '100755' : '100644';
143 if (type === 0o120000) return '120000';
144 if (type === 0o40000) return '40000';
145 if (type === 0o160000) return '160000';
146 return text;
147}
149function agreeTree(oid, entries) {
150 const r = git(dir, ['ls-tree', oid]);
151 if (r.code !== 0) return `git rejected the tree (${r.err.trim().split('\n')[0]})`;
152 const lines = r.out.split('\n').filter(Boolean);
153 if (lines.length !== entries.length) return `entries ply ${entries.length} git ${lines.length}`;
154 for (let i = 0; i < lines.length; i++) {
155 const [mode, , idName] = lines[i].split(' ');
156 const tab = idName.indexOf('\t');
157 const id = idName.slice(0, tab);
158 const name = idName.slice(tab + 1);
159 if (canonicalMode(mode) !== canonicalMode(entries[i].mode) || id !== entries[i].oid || name !== entries[i].name) {
160 return `entry ${i} ply ${entries[i].mode} ${entries[i].oid} ${entries[i].name} git ${mode} ${id} ${name}`;
161 }
162 }
163 return null;
164}
166function commitLines(rng) {
167 const lines = [
168 `tree ${rng.pick(TREES)}`,
169 `parent ${rng.pick(COMMITS)}`,
170 `author ${AUTHOR}`,
171 `committer ${COMMITTER}`,
172 'encoding UTF-8',
173 ];
174 const kind = rng.int(0, 6);
175 if (kind === 1) lines.splice(rng.int(0, lines.length), 0, lines[rng.int(0, lines.length - 1)]);
176 else if (kind === 2) {
177 const i = rng.int(0, lines.length - 1), j = rng.int(0, lines.length - 1);
178 [lines[i], lines[j]] = [lines[j], lines[i]];
179 } else if (kind === 3) lines.splice(rng.int(0, lines.length - 1), 1);
180 else if (kind === 4) {
181 const extra = rng.pick([
182 `tree ${rng.pick(TREES)}`, `parent ${rng.pick(COMMITS)}`, `author ${COMMITTER}`, `committer ${AUTHOR}`,
183 'encoding ISO-8859-1', 'gpgsig -----BEGIN', ' signature', `mergetag object ${commitOid}`, 'x-custom v',
184 ]);
185 lines.splice(rng.int(0, lines.length), 0, extra);
186 } else if (kind === 5) lines.splice(2, 0, `parent ${rng.pick(COMMITS)}`);
187 else if (kind === 6) lines.push('gpgsig -----BEGIN', ' signature');
188 return lines.join('\n') + '\n\n' + rng.pick(['msg\n', '', 'a\n\nb\n']);
189}
191function tagText(rng) {
192 const target = rng.pick(OBJECTS);
193 const lines = [`object ${target.oid}`, `type ${target.type}`, 'tag v1', `tagger ${AUTHOR}`];
194 const kind = rng.int(0, 5);
195 if (kind === 1) lines.splice(rng.int(0, lines.length), 0, lines[rng.int(0, lines.length - 1)]);
196 else if (kind === 2) {
197 const i = rng.int(0, lines.length - 1), j = rng.int(0, lines.length - 1);
198 [lines[i], lines[j]] = [lines[j], lines[i]];
199 } else if (kind === 3) lines.splice(rng.int(0, lines.length - 1), 1);
200 else if (kind === 4) {
201 const again = rng.pick(OBJECTS);
202 lines.splice(rng.int(0, lines.length), 0, rng.pick(['gpgsig abc', 'foo bar', `object ${again.oid}`, `type ${again.type}`, 'tag v2']));
203 } else if (kind === 5) lines[2] = 'tag ';
204 return lines.join('\n') + '\n\nrel\n';
205}
207function treeData(rng) {
208 const entries = [
209 { mode: '100644', name: 'a', oid: blob },
210 { mode: '40000', name: 'd', oid: empty },
211 ];
212 const kind = rng.int(0, 4);
213 if (kind === 1) entries.push({ mode: '100644', name: 'a', oid: blob });
214 else if (kind === 2) entries.reverse();
215 else if (kind === 3) entries[0].mode = rng.pick(['100664', '100755', '120000', '0']);
216 else if (kind === 4) entries.push({ mode: '100644', name: 'b', oid: blob });
217 return concat(entries.map(e => concat([te.encode(`${e.mode} ${e.name}\0`), fromHex(e.oid)])));
218}
220const cases = [];
221cases.push({ name: 'dup-tree', type: 'commit', data: `tree ${empty}\nauthor ${AUTHOR}\ncommitter ${COMMITTER}\ntree ${blob}\n\nmsg\n` });
222cases.push({ name: 'legal-commit', type: 'commit', data: unwrap(encodeCommit({ tree: empty, parents: [commitOid], author: AUTHOR, committer: COMMITTER, encoding: 'UTF-8', message: 'msg\n' })) });
223cases.push({ name: 'legal-tag', type: 'tag', data: unwrap(encodeTag({ object: commitOid, type: 'commit', tag: 'v1', tagger: AUTHOR, message: 'rel\n' })) });
224cases.push({ name: 'legal-tree', type: 'tree', data: treeBytes });
225for (let i = 0; i < N; i++) {
226 const seed = (SEED * 1000003 + i) >>> 0;
227 const rng = new Rng(seed);
228 const kind = rng.int(0, 2);
229 if (kind === 0) cases.push({ name: `commit#${seed}`, seed, type: 'commit', data: commitLines(rng) });
230 else if (kind === 1) cases.push({ name: `tag#${seed}`, seed, type: 'tag', data: tagText(rng) });
231 else cases.push({ name: `tree#${seed}`, seed, type: 'tree', data: treeData(rng) });
232}
234let selected = cases;
235if (ONLY !== null) {
236 const asSeed = Number(ONLY);
237 selected = Number.isInteger(asSeed) && String(asSeed) === ONLY ? cases.filter(c => c.seed === asSeed) : cases.filter(c => c.name === ONLY);
238 if (!selected.length) { console.error(`no case ${ONLY}`); process.exit(2); }
239}
241const fails = [];
242const tally = { agree: 0, rejectGit: 0, rejectRule: 0 };
243console.log(`git-semantic seed ${SEED} n ${N}`);
244try {
245 for (const c of selected) {
246 const data = typeof c.data === 'string' ? c.data : c.data;
247 let parsed, rejected;
248 try { parsed = parseOrThrow(c.type, data); rejected = false; }
249 catch (e) {
250 rejected = true;
251 if (e.code !== 'pack_corrupt') { fails.push(c.name); console.log(`FAIL ${c.name}: untyped ${e.code}: ${e.message}`); continue; }
252 }
253 if (rejected) {
254 const refusal = gitRefusal(c.type, data);
255 const rule = refusal === null ? stricterRule(c.type, data) : null;
256 if (refusal !== null) { tally.rejectGit++; console.log(`reject ${c.name} git too: ${refusal}`); }
257 else if (rule !== null) { tally.rejectRule++; console.log(`reject ${c.name} ply stricter: ${rule}`); }
258 else { fails.push(c.name); console.log(`FAIL ${c.name}: ply rejected an object git's strict check accepts and no named rule covers (repro: --seed ${SEED} --n ${N} --case ${c.seed ?? c.name})`); }
259 continue;
260 }
261 const oid = literally(c.type, data);
262 const diff = c.type === 'commit' ? agreeCommit(oid, parsed) : c.type === 'tag' ? agreeTag(oid, parsed) : agreeTree(oid, parsed);
263 if (diff) { fails.push(c.name); console.log(`FAIL ${c.name}: ${diff}`); }
264 else { tally.agree++; console.log(`agree ${c.name}`); }
265 }
266} finally {
267 rmSync(dir, { recursive: true, force: true });
268}
269// A whole run (no --case) always holds the three legal objects, so zero accepted means ply refused them.
270if (ONLY === null && tally.agree === 0) { fails.push('no-agree'); console.log('FAIL no-agree: ply accepted nothing, the legal commit, tag and tree included'); }
271console.log(`\n${selected.length} cases (seed ${SEED}): ${tally.agree} agree, ${tally.rejectGit} rejected with git, ${tally.rejectRule} rejected by a named stricter rule, ${fails.length} failures`);
272process.exit(fails.length ? 1 : 0);
Diagnostics9 git calls · 390 ms
CallStatusSizeTime0390 ms
discover200191 B4 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=4 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 KiB87 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=87 git.response.bytes=11990 git.response.cache=EXPIRED git.response.duration_ms=87 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 1200347 B · hit3 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=347 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4 git.fetch.haves.count=0 git.fetch.deepen=1 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=347 git.pkt.payload.max=247 git.sideband.band1.bytes=247 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=247 git.pack.trailer=4b72f39b5ea57c5ae3009f90b53e3a6a155093e7Open pack map
fetchtree:0 · deepen 102004.2 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=101 git.response.bytes=4347 git.response.cache=HIT git.response.duration_ms=3 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=10Open pack map
fetchcombine:blob:none+tree:2 · deepen 1200—101 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.cache=BYPASS git.fetch.filter=combine:blob:none+tree:2 git.fetch.wants=19912563f540228593df0c489082e5e2508e21e4 git.fetch.haves.count=0 git.fetch.deepen=1 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 error.type=remote_error error=remote: filter 'combine' not supported
fetchtree:0200919 B · hit3 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=3 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=5323b9266eea5ded637285d1c5320699f12be76eOpen 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=3 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=be7e0453974a5fe832f9065a33bb7e3434c10e9bOpen pack map
fetchtree:0200853 B · hit6 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=6 git.response.bytes=853 git.response.cache=HIT git.response.duration_ms=6 git.fetch.filter=tree:0 git.fetch.wants=fb781d4e4fd58ededa1f1078d937de6f4b1316a2 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=853 git.pkt.payload.max=826 git.sideband.band1.bytes=826 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=1 git.pack.bytes=826 git.pack.trailer=c89bc485f6ad08d875fc515f3fdd69897096847bOpen pack map
fetch2005.0 KiB190 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=190 git.response.bytes=5104 git.response.cache=MISS git.response.duration_ms=190 git.fetch.wants=0d9b69bb90bfcbc50db73f72acb00b2bd729367a 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=5104 git.pkt.payload.max=5077 git.sideband.band1.bytes=5077 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
- a5e284d649084af4
- Request
- 4a0e1529…
- 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