Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane-forge/blob/main/browse/c3_blame.om # interplane-forge INTERPLANE Forge Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `interplane-forge / browse / c3_blame.om` 396 lines ยท 6892 bytes Raw Blame History 1 note browse/c3_blame.om: /blame// from git blame --porcelain, and the in-repo code 2 note search /search?q= (git grep, fixed string, case-insensitive, capped) (ForgeBrowse). 3 global gbbk ulong 4096 4 global gbba ulong 4096 5 global gbbal ulong 4096 6 global gbbt ulong 4096 7 global gbbs ulong 4096 8 global gbbsl ulong 4096 9 global gbbo ulong 4096 10 global gbbn ulong 1 11 global gbbc ulong 1 12 global gbbp ulong 1 13 global gbq uchar 256 14 global gbql ulong 1 15 const BRBLMX ulong 4096 16 const BRHITS ulong 200 17 text tbporc "--porcelain" 18 text tbkauth "author " 19 text tbkatim "author-time " 20 text tbksumm "summary " 21 text tbtblm "Blame" 22 text tbtsrch "Search" 23 text tbbl1 "\n" 24 text tbbl2 "\">Blame output was cut.

\n" 31 text tbgrep "grep" 32 text tbgz "-z" 33 text tbgn "-n" 34 text tbgi "-I" 35 text tbgii "-i" 36 text tbgf "-F" 37 text tbgmc "--max-count=5" 38 text tbge "-e" 39 text tbsf1 "

Search

\n\n" 42 text tbsf4 "

Fixed-string, case-insensitive search of the default branch " 43 text tbsf5 "; at most 5 lines per file and 200 lines in total.

\n" 44 text tbsh1 "

\n" 46 text tbsh3 "

" 48 text tbsh5 "

\n" 49 text tbsnone "

No matches.

\n" 50 text tbsmore "

Only the first 200 matching lines are shown.

\n" 51 text tbsbad "

The search text may not contain control characters.

\n" 52 text tbq1 "q" 53 note ---- blame 54 fn brblamepg to long 55 if not brres 56 ret brerr 404 57 end 58 if eq get gbpl 0 0 59 ret brerr 404 60 end 61 k = brotype 62 if eq k 0 63 ret brerr 404 64 end 65 if eq k 1 66 brloc tbtree 67 ret 302 68 end 69 fksource 70 fka tbblame 71 fka tbporc 72 fkopen 73 brksha 74 fka tbdd 75 fkopen 76 brkp 77 st = fexec BRTMO 78 if ne st 0 79 ret brerr 404 80 end 81 brti tbtblm 82 frepohd 0 83 brrefbar 84 brcrumb 85 brblame 86 ret 200 87 end 88 note brbkey: the first 16 hex of the sha at fxo[a] as a number 89 fn brbkey a ulong to ulong 90 v = ulong 0 91 for i ulong 16 92 v = add shl v 4 brhexv get fxo add a i 93 end 94 ret v 95 end 96 fn brbfind key ulong to ulong 97 n = get gbbn 0 98 for i ulong n bound 4096 99 if eq get gbbk i key 100 ret i 101 end 102 end 103 ret n 104 end 105 note brbishdr: fxo[s, e) starts with 40 lowercase hex and a space 106 fn brbishdr s ulong e ulong to bool 107 if lt sub e s 41 108 ret false 109 end 110 for i ulong 40 111 if not brlhex get fxo add s i 112 ret false 113 end 114 end 115 ret eq get fxo add s 40 32 116 end 117 note brblame: walk the porcelain: header " [ ]", key lines, then "\t" 118 fn brblame to void 119 put gbbn 0 0 120 put gbbc 0 0 121 put gbbp 0 0 122 n = get fxol 0 123 cur = ulong 0 124 ln = ulong 0 125 fput tbbl1 126 s = ulong 0 127 while lt s n bound BRBIG 128 e = brxfind s n 10 129 c = uchar 10 130 if lt s e 131 c = get fxo s 132 end 133 if eq c 9 134 brbline cur ln add s 1 e 135 end 136 if brbishdr s e 137 cur = brbhdr s e 138 ln = brbfin s e 139 else 140 if ne c 9 141 brbkv cur s e 142 end 143 end 144 s = add e 1 145 end 146 fput tbtab2 147 if ne get fxotr 0 0 148 fput tbblcut 149 end 150 end 151 note brbhdr: the table index for the header's sha (a new entry when unseen; BRBLMX when full) 152 fn brbhdr s ulong e ulong to ulong 153 key = brbkey s 154 i = brbfind key 155 n = get gbbn 0 156 if lt i n 157 ret i 158 end 159 if ge n BRBLMX 160 ret BRBLMX 161 end 162 put gbbk n key 163 put gbbo n s 164 put gbbal n 0 165 put gbbsl n 0 166 put gbbt n 0 167 put gbbn 0 add n 1 168 ret n 169 end 170 note brbfin: the final line number (third field of the header) 171 fn brbfin s ulong e ulong to ulong 172 a = brxfind add s 41 e 32 173 ret brxdec add a 1 e 174 end 175 fn brbkv cur ulong s ulong e ulong to void 176 if ge cur BRBLMX 177 ret 178 end 179 if brxat s e tbkatim 180 put gbbt cur brxdec add s len tbkatim e 181 ret 182 end 183 if brxat s e tbkauth 184 put gbba cur add s len tbkauth 185 put gbbal cur sub e add s len tbkauth 186 ret 187 end 188 if brxat s e tbksumm 189 put gbbs cur add s len tbksumm 190 put gbbsl cur sub e add s len tbksumm 191 end 192 end 193 note brbline: one content row; the first row of each run of one commit carries its info 194 fn brbline cur ulong ln ulong a ulong e ulong to void 195 key = ulong 0 196 if lt cur BRBLMX 197 key = get gbbk cur 198 end 199 first = or ne key get gbbp 0 eq get gbbc 0 0 200 put gbbp 0 key 201 put gbbc 0 add get gbbc 0 1 202 if first 203 fput tbbl7 204 else 205 fput tbcd2 206 end 207 fnum ln 208 fput tbbl2 209 if and first lt cur BRBLMX 210 brbcinfo cur 211 end 212 fput tbbl3 213 fnum ln 214 fput tbaq 215 fnum ln 216 fput tbcd4 217 fxesc a sub e a 218 fput tbcd5 219 end 220 fn brbcinfo cur ulong to void 221 o = get gbbo cur 222 fput tbbl4 223 brucmt o 40 224 fput tbaq 225 fxput o 7 226 fput tbbl5 227 brdate get gbbt cur 228 fput tbbl6 229 fxesc get gbba cur get gbbal cur 230 fputc 58 231 fputc 32 232 m = get gbbsl cur 233 if gt m 80 234 m = 80 235 end 236 fxesc get gbbs cur m 237 end 238 note ---- /search?q= 239 fn brsrchpg to long 240 if gt get gbrl 0 0 241 ret brerr 404 242 end 243 q = fqget tbq1 244 put gbql 0 0 245 bad = false 246 if gt q 256 247 ret brerr 400 248 end 249 if gt q 0 250 bad = not brsq ulong q 251 end 252 brdefref 253 if not brres 254 ret brerr 404 255 end 256 brti tbtsrch 257 frepohd 0 258 brsform 259 if bad 260 fput tbsbad 261 ret 400 262 end 263 if gt get gbql 0 0 264 brsrun 265 end 266 ret 200 267 end 268 note brsq: copy fval[0, n) into gbq; false on a control byte 269 fn brsq n ulong to bool 270 for i ulong n bound 256 271 c = get fval i 272 if or lt c 32 eq c 127 273 put gbql 0 0 274 ret false 275 end 276 put gbq i c 277 end 278 put gbql 0 n 279 ret true 280 end 281 fn brsform to void 282 fput tbsf1 283 brurepo 284 fput tbsf2 285 for i ulong get gbql 0 286 fescc get gbq i 287 end 288 fput tbsf3 289 fput tbsf4 290 brrefesc 291 fput tbsf5 292 end 293 fn brsrun to void 294 fksource 295 fka tbgrep 296 fka tbgz 297 fka tbgn 298 fka tbgi 299 fka tbgii 300 fka tbgf 301 fka tbnocol 302 fka tbgmc 303 fka tbge 304 fkopen 305 for i ulong get gbql 0 306 fkc get gbq i 307 end 308 fkopen 309 brksha 310 st = fexec BRTMO 311 n = get fxol 0 312 if or ne st 0 eq n 0 313 fput tbsnone 314 ret 315 end 316 brshits n 317 end 318 note brshits: lines ":\0\0", grouped by file 319 fn brshits n ulong to void 320 s = ulong 0 321 c = ulong 0 322 pa = ulong 0 323 pl = ulong 0 324 while lt s n bound BRBIG 325 e = brxfind s n 10 326 a = add s 41 327 z = brxfind a e 0 328 if and lt a z lt z e 329 if not brxsame pa pl a sub z a 330 if gt pl 0 331 fput tbdive 332 end 333 brshead a sub z a 334 pa = a 335 pl = sub z a 336 end 337 brshit a sub z a add z 1 e 338 c = add c 1 339 end 340 if ge c BRHITS 341 if lt add e 1 n 342 fput tbdive 343 fput tbsmore 344 ret 345 end 346 end 347 s = add e 1 348 end 349 if gt pl 0 350 fput tbdive 351 end 352 end 353 fn brxsame a ulong l ulong b ulong m ulong to bool 354 if ne l m 355 ret false 356 end 357 for i ulong l bound BRBIG 358 if ne get fxo add a i get fxo add b i 359 ret false 360 end 361 end 362 ret true 363 end 364 fn brsblob a ulong l ulong to void 365 bruact tbblob 366 fputc 47 367 bruxo a l 368 end 369 fn brshead a ulong l ulong to void 370 fput tbsh1 371 brsblob a l 372 fput tbaq 373 fxesc a l 374 fput tbsh2 375 end 376 fn brshit a ulong l ulong b ulong e ulong to void 377 y = brxfind b e 0 378 fput tbsh3 379 brsblob a l 380 fputc 35 381 fputc 76 382 fxput b sub y b 383 fput tbaq 384 fxput b sub y b 385 fput tbsh4 386 t = add y 1 387 m = ulong 0 388 if lt t e 389 m = sub e t 390 end 391 if gt m 300 392 m = 300 393 end 394 fxesc t m 395 fput tbsh5 396 end
" 25 text tbbl3 " " 28 text tbbl6 " " 29 text tbbl7 "