GitHubivarvong

ply

main
ply8 git calls167 ms23 KiB4 cachedprotocol v2
101 lines8.2 KiBRaw
1// Full entry point. Bundles that only edit should import 'ply/edit' (src/edit.ts): it pulls in only the free
2// functions it uses. Everything here is tree-shakeable (no classes on the hot path, no module side effects).
3// Re-exports only: each name's documentation is on its declaration.
5// ---- write: edit, commit, push a tree ----
6export { editFile, scanInit, scanStep, scanFinish, validateSpec, decideHead, lookupEntry, memFromScan, memAttrs, isLfsPointerPrefix } from './edit.js';
7export { buildCommitObjects, withCommitData } from './commit-build.js';
8export type { Change, CommitChangesSpec, CommitChangesResult } from './changes.js';
9export { commitChanges } from './changes.js';
10export { pushTree, fileEntries, buildTree, selectObjects, validateTreeSpec } from './tree.js'; // the Node directory walk is 'ply/tree-node'
11export { checkoutTree, treeFiles, canonMode } from './checkout.js'; // writing into a directory is 'ply/checkout-node'
13// ---- read ----
14export type { AbbrevResolution, OpenedBlob } from './read.js';
15export type { Miss, CommitMiss } from './errors.js';
16export { readFile, listTree, readCommit, commitView, resolveCommit, resolveAbbrev, refCandidates, entryType, lsMode, walkPath, walkCommit, fetchCommit, openBlob, readBlob } from './read.js';
17export { readLog, logWindow, logOn } from './log.js';
19// ---- refs, merge, rebase, sign ----
20export { mergeBranch, fastForward, deleteRef, mergeTrees, mergeBase, threeWay, bestBases } from './merge.js';
21export { createBranch, deleteBranch, createTag, deleteTag, listRefs } from './refops.js';
22export { syncRef } from './sync.js';
23export { rebaseBranch, cherryPick, revertCommit, pickCommit, linearChain } from './rebase.js';
24export { ed25519Signer, generateSigner, signCommit, withGpgsig, sshPublicKey, armor } from './sign.js';
26// ---- wire ----
27export { GitHttp, lsRefs, lsRefsBody, fetchBody, v2Init, v2Step, packStream, fetchObject, spInit, spStep, spFinish, fetchPack, negotiate, push, pushWithOptions, pushPack, receiveCaps, discover, pushBody, forgetQuirks } from './client.js';
28export type { Transport } from './transport.js';
29export type { ExportLine, Exporter, EndedSpan, SpanSink, FlatSpan, TelemetryHook, TelemetryErrorSink } from './otel.js';
30export type { Limits, CheckedLimits, LimitsInput } from './limits.js';
31export type { FetchOpts, SpState } from './fetch.js';
32export type { OperationOpts, Outcome } from './operation.js';
33export type { PackObject } from './push.js';
35// ---- ids, names, paths ----
36export type { Oid } from './oid.js';
37export { parseOid, parseCommitId, ZERO_OID } from './oid.js';
38export { OID_HEX_CHARS, MODE_BLOB, MODE_EXEC, MODE_LINK, MODE_TREE, MODE_COMMIT, BLOB_MODES } from './format.js';
39export type { Refname, BranchName, TagName } from './refname.js';
40export type { Path } from './path.js';
41export { parseRefname, parseBranchName, parseTagName } from './refname.js';
42export { parsePath } from './path.js';
44// ---- objects and packs ----
45export type { PackLayout, PackLayoutObject, PackBase, ObjBase, ObjSize, DeltaProgram, PackObjectInput, ParsedObject, ParsedPack, ResolvedObjType } from './packresolve.js';
46export type { DeltaOp } from './pack.js';
47export { spliceDelta, encodeDeltaOps, buildPack, encodeObjHeader, zlibDeflate, parsePack, resolvePack, describePack, applyDelta, parseDelta, applyProgram, deltaOps, makeDelta, packParseOpts } from './pack.js';
48export { encodeDelta, planDeltas } from './delta.js'; // pushing a local repository is 'ply/repo-node'
49export { objectsForPack, reachableObjects, mapStore } from './packwalk.js';
50export { encodePackIndex, indexPack, layoutPackIndex } from './packindex.js';
51export { inflate } from './inflate.js';
53// ---- pulls: bytes in as they arrive, one piece out at a time; a refusal is a value that sticks (#172) ----
54export { inflateInit, inflateReset, inflateFeed, inflatePull, inflateEnd, inflateUnread, declaredBound, cappedBound, zlibWrap, rawWrap } from './inflatestream.js';
55export type { InflateStream, InflatePiece, InflateStreamOpts, StreamBound, StreamWrap, InflateStats, InflateError } from './inflatestream.js';
56export { parsePackInit, parsePackFeed, parsePackPull, parsePackEnd, parsePackClose, packScanOpts, workBudget, WORK_BUDGET, RETAIN_BUDGET } from './packstream.js';
57export type { PackScan, PackPiece, PackScanOpts, PackError, ScanBudget } from './packstream.js';
58export { scanPackIndex, scannedPackOf, SCAN_INDEX_ENTRY_BYTES } from './packscanindex.js';
59// the same pulls as async-iterable ReadableStreams over a byte source: the read loop, once (#241)
60export { scanPack, pktFrames, inflateChunks } from './pullstream.js';
61export type { ByteSource, ScanPiece, ScanPackOpts, InflateChunksOpts } from './pullstream.js';
62export { resolvePackRange, resolvedIndexOf, RESOLVED_ENTRY_BYTES, RESOLVE_CACHE_BYTES, NO_BASE as RESOLVED_NO_BASE, THIN_BASE as RESOLVED_THIN_BASE } from './packrangeresolve.js';
63export type { ResolvedIndex, ResolvedColumns, ResolveStats, ResolveRangeOpts, ThinBaseLookup, ThinBase as ResolvedThinBase } from './packrangeresolve.js';
64export { rangeFromBytes } from './rangesource.js';
65export { planPackBatches, planHash, PLAN_VERSION } from './packplan.js';
66export type { PackPlan, PlannedBatch, PushBudget, PlanOpts, BatchKind } from './packplan.js';
67export type { RangeRead, RangeSource } from './rangesource.js';
68export type { ScannedPack, ScannedEntry, ScannedBase, ScannedType, ScannedObject, ScanColumns, ScanContent, ScanIndexOpts, ScanSource } from './packscanindex.js';
69export { packSubset } from './packsubset.js';
70export type { PackSubset, PackSubsetOpts, OutsideBase } from './packsubset.js';
71export { planTransfer, checkTransferPlan, transferPlanHash, TRANSFER_VERSION, TRANSFER_REF_PREFIX, TRANSFER_IDENT } from './transferplan.js';
72export type { TransferPlan, TransferStepPlan, BatchStep, FinalStep, TempRef, TransferOpts, TransferPack, PlanExpect, PlanExpectConfig } from './transferplan.js';
73export { transferStatus, transferStep, runTransfer, copyTree, sweepTransfers, SETTLE_DEFAULTS } from './transfer.js';
74export { encodeSavedIndex, decodeSavedIndex, describeRefusal as describeSavedIndexRefusal, packIdentity, SAVED_INDEX_VERSION, SAVED_INDEX_ENTRY_BYTES, SAVED_INDEX_FIXED_BYTES } from './packsaved.js';
75export type { PackIdentity, SavedIndex, SavedIndexRefusal } from './packsaved.js';
76export { loadTransferPack } from './transferload.js';
77export type { Loaded as TransferPackLoaded, LoadedPack, LoadOpts as TransferLoadOpts } from './transferload.js';
78export type { TransferNext, TransferRun, LastPush, LastStep, RunOpts, SettleConfig, StepCommit } from './transfer.js';
79export { sidebandStep } from './fetch.js';
80export type { SidebandCounters, SidebandPiece, Sidebanded, SidebandError } from './fetch.js';
81export { Sha1, toHex, fromHex, streamingSha1 } from './sha1.js';
82export { hashObject, parseTree, encodeTree, treeSort, parseCommit, encodeCommit, parseTag, encodeTag, ident, TYPE, TYPE_NAME, TYPE_ID } from './objects.js';
83export { pkt, pkts, pktInit, pktStep, pktFinish } from './pktline.js';
85// ---- tracing, limits, errors, transport ----
86export { Tracer, Span, KIND, arrayExporter, consoleExporter, flattenLine, fromAny } from './otel.js';
87export { DEFAULT_LIMITS, WORKER_LIMITS, LIMIT_OBJECT_OVERHEAD, LIMIT_HELD_TIMEOUT_MS, LIMIT_MEMORY_CACHE_BYTES, LIMIT_MEMORY_CACHE_ENTRIES, withLimits, withDerivedWork, parseLimits, limitError } from './limits.js';
88export { CODES, RETRY, fail, plyError, isPlyCode, retryPolicy, isRetryable, ambiguousAfterPush } from './errors.js';
89export { CODE_DOCS } from './errors-doc.js';
90export { operation, verifyRef } from './operation.js';
91export { createTransport, redactUrl } from './http.js';
92export { cachingFetch, memoryCache, isCacheableFetch, cacheKey, exchangeKind, isPureFetch, verifyFetchAnswer, parseUploadPackRequest } from './packcache.js';
93export { BLOB_CACHE_MAX_BYTES, BLOB_CACHE_MAX_AGE_SECONDS, BLOB_CACHE_HEADER, BLOB_OID_HEADER } from './blobcache.js';
94export { isFilterRejection, isFilterRefusal } from './fetch.js';
95export { fetchPackFiltered } from './fetchpack.js';
96export { validateIdent, validateRef, validatePath } from './validate.js';
97export { compareVersionRefnames } from './refs.js';
98export { concat } from './bytes.js';
99export { assertNever, some, none, isSome, isNone } from './result.js';
100export { matchOptionChecked as matchOption } from './option.js';
101export type { Option, Some, None, OptionHandlers } from './result.js';
Diagnostics8 git calls · 167 ms
CallStatusSizeTime0167 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 KiB76 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=76
git.response.bytes=11990
git.response.cache=EXPIRED
git.response.duration_ms=76
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 · 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=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=10
Open pack map
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=16
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=4b72f39b5ea57c5ae3009f90b53e3a6a155093e7
Open pack map
fetchcombine:blob:none+tree:2 · deepen 1429—16 ms
git.upload-pack fetch
http.response.status_code=429
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=rate_limited
error=HTTP 429 git-upload-pack: \u000d
<html>\u000d
  <head>\u000d
    <meta content="origin" name="referrer">\u000d
    <title>Rate limit &middot; GitHub</title>\u000d
    <meta name="v
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=2
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:02002.4 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=2507
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=8f720d29ff85ce682ffdad9c393b04a3834c3203
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=2507
git.pkt.payload.max=2480
git.sideband.band1.bytes=2480
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=2480
git.pack.trailer=723b6bf1d4d6021fe5eb940c622b9ff00ee4a381
Open pack map
fetch2003.0 KiB70 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=69
git.response.bytes=3059
git.response.cache=MISS
git.response.duration_ms=70
git.fetch.wants=33a04657ceb34aba35895a39ad299d49bddde514
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=3059
git.pkt.payload.max=3032
git.sideband.band1.bytes=3032
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
a5e26ea76ce1f4e0
Request
1389c0e7…
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