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 / store / head.om
| 1 | note store/head.om: nodes/head.om of the store-reading build (run.sh units with FORGE_STORE). The |
| 2 | note default branch of the current repository is the default-branch field of its catalog line |
| 3 | note (store/repos.om put it into fabr after checking it against the branch rule of om/landrec.om and |
| 4 | note against record 1), so no HEAD file is read. Callers (browse brdefref, dl dldefbr) fall back to |
| 5 | note "main" when nshead is false, as with nodes/head.om; here that happens only without a current |
| 6 | note repository. |
| 7 | global nshb uchar 256 |
| 8 | global nshbl ulong 1 |
| 9 | fn nshead to bool |
| 10 | put nshbl 0 0 |
| 11 | i = get fridx 0 |
| 12 | if ge i get fan 0 |
| 13 | ret false |
| 14 | end |
| 15 | n = get fabl i |
| 16 | if or eq n 0 gt n len nshb |
| 17 | ret false |
| 18 | end |
| 19 | o = get fabo i |
| 20 | for k ulong n bound 256 |
| 21 | put nshb k get fabr add o k |
| 22 | end |
| 23 | put nshbl 0 n |
| 24 | ret true |
| 25 | end |