nx_sovgit_obj.nx
buildroot/runtime/nx_sovgit_obj.nx
about
nx_sovgit_obj.nx -- SOVEREIGN GIT OBJECT STORE (roadmap rung X0). Content-addressed blob/tree/commit:
frame = "<type> <len>\0<content>"
id = SHA-256(frame) [git object-format=sha256, 64 lowercase hex]
loose = zlib(frame) at <objroot>/<id[0:2]>/<id[2:64]>
Reuses the sovereign substrate, no reinvention: sha256_digest (nx_sha256), dfe_compress (nx_deflate_enc,
raw deflate -> we wrap 0x78 0x01 + adler32), nx_zlib_inflate + adler32 (nx_zlib_wrap/nx_adler32).
Proven byte-exact against STOCK git 2.39 sha256 ids in nx_sovgit_obj_gate.nx.
license_tier: ORIGINAL
dependencies 5 imports · 10 importers
imports: nx_syscalls.nxnx_sha256.nxnx_deflate_enc.nxnx_zlib_wrap.nxnx_adler32.nx
imported by: nx_sovgit_git.nxnx_sovgit_obj_gate.nxnx_sovgit_pack_gate.nxnx_sovgit_packprobe.nxnx_sovgit_push.nxnx_sovgit_repo_gate.nxnx_sovgit_rtprobe.nxnx_sovgit_serve.nxnx_sovgit_unpack_gate.nxnx_sovgit_zlibprobe.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 14 | const K_MAGIC_1040: i64 = 1040 |
| 15 | const K_MAGIC_65536: i64 = 65536 |
| 16 | const K_MAGIC_4096: i64 = 4096 |
functions
| 19 | func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 21 | func sg_cpy(dst: *u8, dsto: i64, src: *u8, srco: i64, n: i64) -> i64 |
| 28 | func sg_dec(out: *u8, at: i64, v: i64) -> i64 |
| 41 | func sg_hex(dig: *u8, out: *u8) -> i64 |
| 59 | func sg_be32(out: *u8, at: i64, v: i64) -> i64 called by 1: sg_zwrap |
| 69 | func sg_frame(typ: *u8, content: *u8, clen: i64, out: *u8) -> i64 |
| 82 | func sg_oid_raw(typ: *u8, content: *u8, clen: i64, out32: *u8) -> i64 called by 7: assemble_reposg_oid_hexmainmainsgp_walkmain+1 calls 4: sys_mmapsg_framesha256_digestsys_munmap |
| 91 | func sg_oid_hex(typ: *u8, content: *u8, clen: i64, outhex: *u8) -> i64 |
| 104 | func sg_zwrap(frame: *u8, flen: i64, zout: *u8) -> i64 called by 6: pk_objectsg_write_loosemainpk_objectsgp_pack_addmain calls 3: dfe_compresssg_be32adler32 |
| 116 | func sg_loose_path(objroot: *u8, hex: *u8, pbuf: *u8) -> i64 |
| 131 | func sg_write_loose(objroot: *u8, typ: *u8, content: *u8, clen: i64, outhex: *u8) -> i64 called by 6: unpack_intoassemble_repomainmainassemble_repomain calls 12: sg_oid_hexsg_slensys_mkdirsys_mmapsg_cpysg_frame+6 |
| 168 | func sg_read_loose(objroot: *u8, hex: *u8, out: *u8, typ_out: *u8) -> i64 called by 4: walk_depthpack_diskserve_uimain calls 7: sg_slensys_mmapsg_loose_pathsys_read_filesys_munmapnx_zlib_inflate+1 |
| 203 | func sg_tree_entry(out: *u8, at: i64, mode: *u8, name: *u8, rawhash: *u8) -> i64 |
| 213 | func main() -> i64 |