omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / apps / interplane-forge / patch / p1decl.om
| 1 | note patch/p1decl.om: git patch intake (docs/API.md "Git patches"). Every text and global of the slice, |
| 2 | note declared before any use. Prefixes: functions pa*, globals gp*, texts tp*. |
| 3 | note A patch is a `git format-patch --stdout BASE..HEAD` mbox with a title and a description, uploaded |
| 4 | note by the local command `interplane patch` (tools/bring) in one signed POST. The forge checks it, |
| 5 | note applies it once on BASE in a throwaway work tree and keeps the bytes under |
| 6 | note <data>patches/<owner>/<repo>/<id>/. It never writes a repository and never signs for anyone. |
| 7 | note Repositories are the bare git stores of the Interplane store this build reads, |
| 8 | note <store>projects/<name>/repo.git (store/repos.om, server/util.om fksdir); nothing here reads |
| 9 | note Radicle storage. The slice is composed only in a store-reading build (run.sh). |
| 10 | text tpsdir "patches/" |
| 11 | text tpindex "index" |
| 12 | text tptmp "patch-work/" |
| 13 | text tppw "pw" |
| 14 | text tpfmb "mbox" |
| 15 | text tpfst "statement" |
| 16 | text tpfsg "signature" |
| 17 | text tpfhd "head" |
| 18 | text tpfss "status" |
| 19 | text tpftt "title" |
| 20 | text tpfds "description" |
| 21 | text tpfme "meta" |
| 22 | text tpfdf "diff" |
| 23 | text tpnewd ".new-" |
| 24 | text tpopen "open\n" |
| 25 | text tpwm "/m" |
| 26 | text tpww "/w" |
| 27 | text tpwalt "/w/.git/objects/info/alternates" |
| 28 | text tpobj "/objects\n" |
| 29 | text tpdot "." |
| 30 | text tpdd ".." |
| 31 | note ---- routes |
| 32 | text tppats "/patches" |
| 33 | text tppulls "/pulls" |
| 34 | text tppull "/pull" |
| 35 | text tppnew "/patches/new" |
| 36 | text tpsfxp ".patch" |
| 37 | text tpsfxd ".diff" |
| 38 | text tpqpage "page" |
| 39 | note ---- form fields of POST .../patches/new |
| 40 | text tpfcsrf "csrf" |
| 41 | text tpfrepo "repo" |
| 42 | text tpfbase "base" |
| 43 | text tpfttl "title" |
| 44 | text tpfdsc "description" |
| 45 | text tpfmbx "mbox" |
| 46 | text tpfsig "sig" |
| 47 | text tpcsrfe "csrf=" |
| 48 | note ---- the signed statement and the signature check |
| 49 | text tpst1 "interplane-patch 1\n" |
| 50 | text tpns "interplane-patch" |
| 51 | text tpfrom "From " |
| 52 | text tpfrom2 " Mon Sep 17 00:00:00 2001" |
| 53 | text tpdg "diff --git " |
| 54 | text tpgbp "GIT binary patch" |
| 55 | text tpbf "Binary files " |
| 56 | text tprnf "rename from " |
| 57 | text tprnt "rename to " |
| 58 | text tpcpf "copy from " |
| 59 | text tpcpt "copy to " |
| 60 | text tpmcopy "patches with copy headers are not accepted" |
| 61 | note ---- git argv words (the argv-only exec path of server/util.om: fkb, fka, fexec; no shell) |
| 62 | text tpdC "-C" |
| 63 | note the empty tree as git's attribute source: no .gitattributes a patch writes is read (git 2.43 --attr-source) |
| 64 | text tpatsrc "--attr-source=4b825dc642cb6eb9a060e54bf8d69288fbee4904" |
| 65 | text tpc "-c" |
| 66 | text tpinit "init" |
| 67 | text tpq "-q" |
| 68 | text tpqq "--quiet" |
| 69 | text tptpl "--template=" |
| 70 | text tpcatf "cat-file" |
| 71 | text tpde "-e" |
| 72 | text tpcmt "^{commit}" |
| 73 | text tpgmb "merge-base" |
| 74 | text tpisa "--is-ancestor" |
| 75 | text tprh "refs/heads/" |
| 76 | text tprdt "read-tree" |
| 77 | text tpupr "update-ref" |
| 78 | text tpnod "--no-deref" |
| 79 | text tphead "HEAD" |
| 80 | text tpam "am" |
| 81 | text tpamd "--committer-date-is-author-date" |
| 82 | text tpamk "--keep-cr" |
| 83 | text tpamn "--no-verify" |
| 84 | text tpam3 "--no-3way" |
| 85 | text tprevp "rev-parse" |
| 86 | text tprevl "rev-list" |
| 87 | text tpcnt "--count" |
| 88 | text tpdots ".." |
| 89 | text tpdiff "diff" |
| 90 | text tpraw "--raw" |
| 91 | text tpnumst "--numstat" |
| 92 | text tpnorn "--no-renames" |
| 93 | text tpfull "--full-index" |
| 94 | text tpdM "-M" |
| 95 | text tpnoext "--no-ext-diff" |
| 96 | text tpnotc "--no-textconv" |
| 97 | note the configuration every git run in the throwaway work tree carries: no hooks, no maintenance, |
| 98 | note no network transport, no filter program, symbolic links written as plain files, a fixed committer |
| 99 | text tpk1 "core.hooksPath=/dev/null" |
| 100 | text tpk2 "gc.auto=0" |
| 101 | text tpk3 "maintenance.auto=false" |
| 102 | text tpk4 "protocol.allow=never" |
| 103 | text tpk5 "core.fsmonitor=false" |
| 104 | text tpk6 "core.symlinks=false" |
| 105 | text tpk7 "core.autocrlf=false" |
| 106 | text tpk8 "commit.gpgSign=false" |
| 107 | text tpk9 "user.name=interplane-forge" |
| 108 | text tpk10 "user.email=forge@interplane.io" |
| 109 | text tpk11 "filter.lfs.clean=" |
| 110 | text tpk12 "filter.lfs.smudge=" |
| 111 | text tpk13 "filter.lfs.process=" |
| 112 | text tpk14 "filter.lfs.required=false" |
| 113 | text tpk15 "core.attributesFile=/dev/null" |
| 114 | text tpk16 "submodule.recurse=false" |
| 115 | text tpk17 "init.defaultBranch=main" |
| 116 | note ---- text answers of the upload (plain text, one reason a refusal) |
| 117 | text tpctxt "text/plain; charset=utf-8" |
| 118 | text tprefu "refused: " |
| 119 | text tpacc "accepted\n" |
| 120 | text tpexi "exists\n" |
| 121 | text tpaid "id " |
| 122 | text tpapth "path " |
| 123 | text tpm403 "sign in first: this request carries no session" |
| 124 | text tpmcsrf "missing or wrong CSRF token" |
| 125 | text tpmrate "too many writes from this address or key; wait a minute" |
| 126 | text tpmoff "writes are switched off on this forge right now" |
| 127 | text tpmform "the body is not the patch form: fields csrf, repo, base, title, description, mbox and sig, each once" |
| 128 | text tpmnorp "no such public repository" |
| 129 | text tpmrepo "the repo field does not name this repository" |
| 130 | text tpmnogs "this repository has no git store on this forge" |
| 131 | text tpmbase "base is not a commit id of 40 lowercase hex digits" |
| 132 | text tpmunk "unknown base: the repository has no such commit" |
| 133 | text tpmnotm "base is not reachable from the repository's main branch" |
| 134 | text tpmttl "the title must be 1 to 256 bytes of UTF-8 text on one line" |
| 135 | text tpmdsc "the description must be at most 60000 bytes of UTF-8 text without control bytes" |
| 136 | text tpmbig "the mbox is larger than 2097152 bytes" |
| 137 | text tpmb64 "the mbox field is not base64url without padding" |
| 138 | text tpmnfp "the mbox is not git format-patch output" |
| 139 | text tpmmany "the mbox holds more than 100 commits" |
| 140 | text tpmsigf "the sig field is not an armored SSH signature" |
| 141 | text tpmsig "the signature does not verify for this session's key and this patch" |
| 142 | text tpmbin "binary patches are not accepted" |
| 143 | text tpmpath "a patch names a path outside the repository" |
| 144 | text tpmappl "the mbox does not apply cleanly on base" |
| 145 | text tpmcnt "git applied a different number of commits than the mbox holds" |
| 146 | text tpmsub "the patch adds a submodule" |
| 147 | text tpmdbig "the combined diff of the patch is larger than 16 MiB" |
| 148 | text tpmint "the forge could not check the patch (internal error)" |
| 149 | text tpmwr "the forge could not store the patch" |
| 150 | text tplrm "PATCH-TMP a work folder under <data>patch-work/ (pw...) could not be removed\n" |
| 151 | note ---- pages |
| 152 | text tptlist "Patches" |
| 153 | text tptnew "Open a patch" |
| 154 | text tppor1 "https://interplane.io" |
| 155 | text tppor2 "https://www.aienos.com" |
| 156 | text tph1 "<div class=\"bar\"><b>" |
| 157 | text tph1a " patch</b> " |
| 158 | text tph1b " patches</b> " |
| 159 | text tph2 "<a href=\"" |
| 160 | text tph2n "/patches/new\">How to open a patch</a></div>\n" |
| 161 | text tphul "<ul class=\"commits\">\n" |
| 162 | text tphule "</ul>\n" |
| 163 | text tphli "<li><a class=\"subject\" href=\"" |
| 164 | text tphq "\">" |
| 165 | text tphae "</a>" |
| 166 | text tphm1 "<div class=\"meta\"><span class=\"label\">open</span> <code>" |
| 167 | text tphm2 "</code> opened " |
| 168 | text tphby " by " |
| 169 | text tphm3 " · " |
| 170 | text tphc1 " commit" |
| 171 | text tphc2 " commits" |
| 172 | text tphf1 " file" |
| 173 | text tphf2 " files" |
| 174 | text tphm4 "</div></li>\n" |
| 175 | text tphnone "<p class=\"empty\">No patches yet.</p>\n" |
| 176 | text tphpg1 "<div class=\"pager\">" |
| 177 | text tphpgn "\">Newer</a>" |
| 178 | text tphpgo "\">Older</a>" |
| 179 | text tphpg2 "</div>\n" |
| 180 | text tphqp "/patches?page=" |
| 181 | text tphcode "<code>" |
| 182 | text tphcodz "</code>" |
| 183 | text tphp1 "<div class=\"box commit\"><h2>" |
| 184 | text tphp2 "</h2>\n<p class=\"meta\"><span class=\"label\">open</span> <code>" |
| 185 | text tphp3 "</p>\n<p class=\"meta\">" |
| 186 | text tphp4 " bytes. Base <a href=\"" |
| 187 | text tphcm "/commit/" |
| 188 | text tphp5 "</code></a>. Applied head <code>" |
| 189 | text tphp6 "</code>: the last commit this forge's own <code>git am</code> made on the base. It is in no repository; the owner applies the patch by hand.</p>\n</div>\n" |
| 190 | text tphds1 "<pre class=\"msg\">" |
| 191 | text tphpre "</pre>\n" |
| 192 | text tphap1 "<div class=\"box\"><h3>Apply it</h3>\n<pre class=\"so-cmd\">git checkout -b patch-" |
| 193 | text tphap2 "\ncurl -fsSL " |
| 194 | text tphap3 " | git am</pre>\n<p><a href=\"" |
| 195 | text tphap4 "\">Raw patch (mbox)</a> · <a href=\"" |
| 196 | text tphap5 "\">Diff</a></p></div>\n" |
| 197 | text tphsg1 "<div class=\"box\"><h3>Signature</h3>\n<p class=\"meta\">The author's key <code>" |
| 198 | text tphsg2 "</code> signed this statement with <code>ssh-keygen -Y sign -n interplane-patch</code>; the forge checked the signature before it kept the patch. The lines are: format, repository, base, SHA-256 of the mbox, SHA-256 of the title, a line feed and the description.</p>\n<pre class=\"hit\">" |
| 199 | text tphsg3 "<pre class=\"hit\">" |
| 200 | text tphdv "</div>\n" |
| 201 | text tphdf1 "<h3>Changes</h3>\n<pre class=\"hit\">" |
| 202 | text tphdfc "<p class=\"meta\">The diff is longer than this page shows; the raw diff has all of it.</p>\n" |
| 203 | text tphn1 "<div class=\"box\"><h2>Open a patch</h2>\n<p>A patch is a set of commits you propose for this project. You send it from your own clone with the <code>interplane</code> program; your key signs it on your computer and never leaves it. The owner applies a patch by hand.</p>\n<pre class=\"so-cmd\">interplane patch " |
| 204 | text tphn2 "</pre>\n<p class=\"meta\">Run it inside a git work tree with your commits on top of this project's main branch. It shows what will be sent (base, commits, files, bytes, title) and sends only after you type yes. Limits: 100 commits, 2 MiB of <code>git format-patch</code> output, no binary patches.</p>\n</div>\n" |
| 205 | note ---- JSON (docs/API.md forge/patch-list/1 and forge/patch/1) |
| 206 | text tpjl1 "{\"schema\":\"forge/patch-list/1\",\"base\":\"" |
| 207 | text tpjp1 "{\"schema\":\"forge/patch/1\",\"base\":\"" |
| 208 | text tpjown "\",\"owner\":\"" |
| 209 | text tpjrep "\",\"repo\":\"" |
| 210 | text tpjpage "\",\"page\":" |
| 211 | text tpjper ",\"per_page\":30,\"count\":" |
| 212 | text tpjpats ",\"patches\":[\n" |
| 213 | text tpjnext "\n],\"next\":" |
| 214 | text tpjprev ",\"prev\":" |
| 215 | text tpjend "}\n" |
| 216 | text tpjid "{\"id\":\"" |
| 217 | text tpjid2 "\",\"id\":\"" |
| 218 | text tpjttl "\",\"title\":" |
| 219 | text tpjdsc ",\"description\":" |
| 220 | text tpjnm ",\"name\":" |
| 221 | note the keys of SPEC section 3 after title, in their order (fyk / fyk0 of server/jsonp.om) |
| 222 | text tpkst "status" |
| 223 | text tpksd "state_derived" |
| 224 | text tpkau "author" |
| 225 | text tpkdid "did" |
| 226 | text tpkim "imported" |
| 227 | text tpkbc "base_commit" |
| 228 | text tpkhc "head_commit" |
| 229 | text tpkcm "commits" |
| 230 | text tpkfl "files" |
| 231 | text tpkby "bytes" |
| 232 | text tpkcd "code" |
| 233 | text tpksha "mbox_sha256" |
| 234 | text tpkop "opened" |
| 235 | text tpkcl "closed" |
| 236 | text tpkmg "merge" |
| 237 | text tpklb "labels" |
| 238 | text tpkco "comments" |
| 239 | text tpkcr "created" |
| 240 | text tpkcc "comments_count" |
| 241 | text tpkpt "path" |
| 242 | text tpkpa "patch" |
| 243 | text tpkdf "diff" |
| 244 | text tpkbn "bundle" |
| 245 | text tpkst2 "states" |
| 246 | text tpkdm "damaged" |
| 247 | text tpkdu "diff_unavailable" |
| 248 | text tpktt "thread_truncated" |
| 249 | text tpktr "thread_reason" |
| 250 | note the values of diff_unavailable (pajduw) and of thread_reason (pajtrw; "too-large" is in both) |
| 251 | text tpun1 "no-code-file" |
| 252 | text tpun2 "no-base" |
| 253 | text tpun3 "base-not-in-store" |
| 254 | text tpun4 "too-large" |
| 255 | text tpun5 "bundle-too-large" |
| 256 | text tpun6 "diff-failed" |
| 257 | text tptr1 "malformed-record" |
| 258 | text tptr3 "document-budget" |
| 259 | text tpkfrm "from" |
| 260 | text tpkow "owner" |
| 261 | text tpkrp "repo" |
| 262 | text tpknum "number" |
| 263 | text tpkurl "url" |
| 264 | text tpklog "login" |
| 265 | text tpkknd "kind" |
| 266 | text tpkstt "state" |
| 267 | text tpkln "line" |
| 268 | text tpktim "time" |
| 269 | text tpkbdy "body" |
| 270 | text tpkcmt "commit" |
| 271 | text tpkrch "reach" |
| 272 | text tpkmn "main" |
| 273 | text tpkobs "observed" |
| 274 | text tpkmb "mbox" |
| 275 | text tpknone "none" |
| 276 | text tpgith "github" |
| 277 | text tpdash "-" |
| 278 | text tpjnull "null" |
| 279 | text tpjsep ",\n" |
| 280 | note ---- request state |
| 281 | note gpfv: one percent-decoded form field (padec), read by the field checks and patch/p2utf8.om |
| 282 | global gpfv uchar 65536 |
| 283 | note gpfo / gpfn / gpfs: offset, length and presence of the seven form fields in fbig, by index: |
| 284 | note 0 csrf, 1 repo, 2 base, 3 title, 4 description, 5 mbox, 6 sig |
| 285 | global gpfo ulong 8 |
| 286 | global gpfn ulong 8 |
| 287 | global gpfs ulong 8 |
| 288 | note gpmb: the decoded mbox (F1: at most 2 MiB) |
| 289 | global gpmb uchar 2097152 |
| 290 | global gpmbl ulong 1 |
| 291 | note gpttl: the title; a signed patch's is at most 256 bytes (F2), an imported item's is cut to 1024 |
| 292 | global gpttl uchar 1024 |
| 293 | global gpttll ulong 1 |
| 294 | global gpdsc uchar 60000 |
| 295 | global gpdscl ulong 1 |
| 296 | global gpsig uchar 4096 |
| 297 | global gpsigl ulong 1 |
| 298 | global gpbase uchar 40 |
| 299 | global gphead uchar 40 |
| 300 | global gpid uchar 16 |
| 301 | global gpst uchar 512 |
| 302 | global gpstl ulong 1 |
| 303 | note gpncm: commits the mbox holds; gpnfl: files the applied patch changed; gpgrd: what the scan of |
| 304 | note the mbox found (0 nothing, 2 a binary patch, 3 a path outside the repository) |
| 305 | global gpncm ulong 1 |
| 306 | global gpnfl ulong 1 |
| 307 | global gpgrd ulong 1 |
| 308 | note gpp: path builder; gpstm: the 16 hex digits that name this request's work folder and staging |
| 309 | note folder; gpde: one batch of directory entries (the work-folder remover) |
| 310 | global gpp uchar 4096 |
| 311 | global gppl ulong 1 |
| 312 | global gpstm uchar 16 |
| 313 | global gpde uchar 32768 |
| 314 | note ---- a stored patch read back (paload): author DID, creation time, commit and file counts, mbox |
| 315 | note bytes and its SHA-256 from the meta file; title, base and head in the globals above |
| 316 | global gpmdid uchar 128 |
| 317 | global gpmdidl ulong 1 |
| 318 | global gpmts ulong 1 |
| 319 | global gpmcm ulong 1 |
| 320 | global gpmfl ulong 1 |
| 321 | global gpmby ulong 1 |
| 322 | global gpmsha uchar 64 |
| 323 | note gpix: the index file of one list request (paixld). The page loaders read every item through fxo, |
| 324 | note so the index cannot stay there while the items of the list are counted. As large as fxo: an index |
| 325 | note of 16777216 bytes or more (986896 lines) is the whole 500 of fincut, as before |
| 326 | global gpix uchar 16777216 |
| 327 | note gpids: the ids of one list page (30 rows of 16 hex digits); gpln: a small line buffer |
| 328 | global gpids uchar 480 |
| 329 | global gpln uchar 256 |
| 330 | global gplnl ulong 1 |
| 331 | note gpcur / gpbad: read position and failure flag of the meta file parser |
| 332 | global gpcur ulong 1 |
| 333 | global gpbad ulong 1 |
| 334 | note ---- imported proposals (SPEC prstore/r1 extension, patch/p5imp.om); files of an item folder |
| 335 | text tpfsj "source.json" |
| 336 | text tpfgh "gh" |
| 337 | text tpfth "thread" |
| 338 | text tpflb "labels" |
| 339 | text tpfmg "merged" |
| 340 | text tpfrc "reach" |
| 341 | text tpfbn "head.bundle" |
| 342 | text tpdpd "pdiff/" |
| 343 | text tpsfxg ".big" |
| 344 | text tpsw1 "closed\n" |
| 345 | text tpsw2 "merged\n" |
| 346 | text tpsjpre "{\"kind\":\"github-import\",\"owner\":\"" |
| 347 | text tpsjow "\"owner\":\"" |
| 348 | text tpsjrp "\"repo\":\"" |
| 349 | text tpsjurl "\"url\":\"" |
| 350 | text tpsjutc "\"imported_utc\":\"" |
| 351 | text tpsjnum "\"number\":" |
| 352 | text tpsjder "\"state_derived\":true" |
| 353 | text tpghn "number " |
| 354 | text tpghl "login " |
| 355 | text tpgho "opened " |
| 356 | text tpghc "closed " |
| 357 | text tpghm "merged " |
| 358 | text tprcom "comment" |
| 359 | text tprrev "review" |
| 360 | text tprrc "review-comment" |
| 361 | text tprch1 "reachable" |
| 362 | text tprch2 "not-reachable" |
| 363 | text tprch3 "unknown" |
| 364 | text tpwopn "open" |
| 365 | text tpwclo "closed" |
| 366 | text tpwmrg "merged" |
| 367 | text tpsfxb ".bundle" |
| 368 | text tpctbin "application/octet-stream" |
| 369 | text tpbund "bundle" |
| 370 | text tpunb "unbundle" |
| 371 | text tpnocol "--no-color" |
| 372 | text tpdots3 "..." |
| 373 | text tpm409 "another item of this store holds this patch id" |
| 374 | text tpmdint "the diff could not be made (internal error)\n" |
| 375 | note ---- imported proposals: HTML |
| 376 | text tputc " UTC" |
| 377 | text tpimp1 "Imported from GitHub " |
| 378 | text tpimp2 ", by " |
| 379 | text tpimp3 " (code only)" |
| 380 | text tpbok "<b class=\"ok\">" |
| 381 | text tpbbad "<b class=\"bad\">" |
| 382 | text tpbmut "<b class=\"muted\">" |
| 383 | text tpboff "</b>" |
| 384 | text tpbder " <b class=\"muted\">derived</b>" |
| 385 | text tpnotl "(untitled)" |
| 386 | text tpiwi " imported " |
| 387 | text tpiwo " opened " |
| 388 | text tpir1 "<div class=\"meta\">" |
| 389 | text tpir2 " <code>" |
| 390 | text tpsth "<span class=\"states\">" |
| 391 | text tpsto " open · " |
| 392 | text tpstc " closed · " |
| 393 | text tpstm " merged</span> " |
| 394 | text tpdmg1 "<span class=\"muted\">" |
| 395 | text tpdmg2 " damaged item is not shown</span> " |
| 396 | text tpdmg3 " damaged items are not shown</span> " |
| 397 | text tpip2 "</h2>\n<p class=\"meta\">" |
| 398 | text tpipn " #" |
| 399 | text tpito " · opened " |
| 400 | text tpitc " · closed " |
| 401 | text tpitm " · merged " |
| 402 | text tpipm "<p class=\"meta\">" |
| 403 | text tpipe "</p>\n" |
| 404 | text tpider "<p class=\"meta\">GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).</p>\n" |
| 405 | text tpilab "Labels: " |
| 406 | text tpisb "Base <code>" |
| 407 | text tpisb2 "</code> · " |
| 408 | text tpisnb "No base commit · " |
| 409 | text tpish "Head <code>" |
| 410 | text tpimg1 "Merged on GitHub as <code>" |
| 411 | text tpimr1 "; reachable from main <code>" |
| 412 | text tpimr2 "; not reachable from main <code>" |
| 413 | text tpimr3 "; reachability from main unknown" |
| 414 | text tpimro " (observed " |
| 415 | text tpibox "<div class=\"box\"><p class=\"meta\">" |
| 416 | text tpiwr " wrote on " |
| 417 | text tpidsc "Description" |
| 418 | text tpidbig "<p class=\"meta\">The description is too large for this page.</p>\n" |
| 419 | text tpirv1 " reviewed (" |
| 420 | text tpirv2 ") on " |
| 421 | text tpirc1 " commented on <code>" |
| 422 | text tpirc2 "</code> line " |
| 423 | text tpion " on " |
| 424 | text tpitbad "<p class=\"meta\">The thread stops here: its next record is malformed.</p>\n" |
| 425 | text tpitcut "<p class=\"meta\">The thread is too long for this page; the rest is not shown.</p>\n" |
| 426 | text tpitbig "<p class=\"meta\">The thread file is larger than this forge reads; the rest is not shown.</p>\n" |
| 427 | text tpibd1 "<div class=\"box\"><h3>Fetch it</h3>\n<p class=\"meta\">A git bundle of the pull request's head, " |
| 428 | text tpibd2 " bytes.</p>\n<pre class=\"so-cmd\">curl -fsSL " |
| 429 | text tpibd3 " -o " |
| 430 | text tpibd4 "\ngit fetch " |
| 431 | text tpibd4b " refs/pull/" |
| 432 | text tpibd5 "/head</pre>\n<p><a href=\"" |
| 433 | text tpibd6 "\">Raw bundle</a>" |
| 434 | text tpibd7 " · <a href=\"" |
| 435 | text tpibd9 "</p></div>\n" |
| 436 | text tpicn1 "<div class=\"box\"><h3>Code</h3>\n<p class=\"meta\">The head commit is on main: <a href=\"" |
| 437 | text tpicn2 "</code></a>.</p></div>\n" |
| 438 | text tpipv1 "<div class=\"box\"><h3>Provenance</h3>\n<p class=\"meta\">This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:</p>\n<pre class=\"hit\">" |
| 439 | text tpich "<h3>Changes</h3>\n<p class=\"meta\">" |
| 440 | text tpicg0 "There is no diff: the head commit is already on main." |
| 441 | text tpicg7 "There is no diff: this item holds no code file." |
| 442 | text tpicx "<div class=\"box\"><h3>Code</h3>\n<p class=\"meta\">This item holds no code file.</p></div>\n" |
| 443 | text tpicg1 "There is no stored diff for this mbox." |
| 444 | text tpicg2 "There is no diff: the bundle has no base commit." |
| 445 | text tpicg3 "There is no diff: the base commit is not in this project's git store." |
| 446 | text tpicg4 "The diff is larger than 16 MiB, too large to show: fetch the bundle instead." |
| 447 | text tpicg5 "The diff could not be made (internal error)." |
| 448 | text tpicg6 "The diff is empty." |
| 449 | text tpicg8 "This bundle is larger than the display limit. Fetch the bundle to see the changes." |
| 450 | note gpimp: the loaded item is imported (1) or signed (0); gpist: its status (0 open, 1 closed, 2 |
| 451 | note merged); gpider: its state is derived (code-only); gpicode: its code file (0 none, 1 mbox, 2 |
| 452 | note head.bundle; its size in gpmby); gpihb: it has a base (gpbase); gpnum: its GitHub number; gpbd: |
| 453 | note the bundle diff (pabdiff's answer; 9 not asked); gpsc: the items a list page shows by state (list |
| 454 | note head); gptr: why the comments of forge/patch/1 are not the whole thread (pajcoms: 0 they are, 1 a |
| 455 | note malformed record, 2 the thread file is larger than gpth, 3 the document budget PAJMX) |
| 456 | global gpimp ulong 1 |
| 457 | global gpist ulong 1 |
| 458 | global gpider ulong 1 |
| 459 | global gpicode ulong 1 |
| 460 | global gpihb ulong 1 |
| 461 | global gpnum ulong 1 |
| 462 | global gpbd ulong 1 |
| 463 | global gpsc ulong 3 |
| 464 | global gptr ulong 1 |
| 465 | note gpr: offsets and lengths of the parsers (thread record, gh line, source.json value, reach line) |
| 466 | global gpr ulong 16 |
| 467 | note gpsrc: source.json (its first 4096 bytes); gpgh: the gh file (its first 2048 bytes); gpth: the |
| 468 | note thread (as much as fxo reads; gpthc 1 when the file is larger) |
| 469 | global gpsrc uchar 4096 |
| 470 | global gpsrcl ulong 1 |
| 471 | global gpgh uchar 2048 |
| 472 | global gpghl ulong 1 |
| 473 | global gpth uchar 16777216 |
| 474 | global gpthl ulong 1 |
| 475 | global gpthc ulong 1 |
| 476 | note PAPGMX: the most an imported page's description and thread take of fob (8 MiB), so the |
| 477 | note provenance box and a 400000-byte diff (6 bytes each at most, escaped) still fit after them |
| 478 | const PAPGMX ulong 5000000 |
| 479 | note PAJMX: the most forge/patch/1 takes of fob (8388608 bytes) up to the end of its comments. The |
| 480 | note 65536 bytes left hold the rest of the document: at most 24578 bytes of "created" (a source.json |
| 481 | note value of up to 4096 bytes, 6 bytes each escaped), four links of under 250 bytes and the fixed keys |
| 482 | const PAJMX ulong 8323072 |