mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
Fix referential transparency in %merg
This commit is contained in:
parent
ef94352267
commit
68fb76214d
@ -290,10 +290,12 @@
|
||||
|= [hen=duct wen=@da mer=mizu] :: aka direct change
|
||||
~& [%apply-mizu-hit q.mer]
|
||||
~& [%apply-mizu-let p.mer]
|
||||
?. (gte p.mer let.dom) !! :: no
|
||||
=. +>.$ %= +>.$
|
||||
ran r.mer
|
||||
hut.ran (~(uni by hut.r.mer) hut.ran)
|
||||
lat.ran (~(uni by lat.r.mer) lat.ran)
|
||||
let.dom p.mer
|
||||
hit.dom q.mer
|
||||
hit.dom (~(uni by q.mer) hit.dom)
|
||||
==
|
||||
=+ ^= hed :: head commit
|
||||
=< q
|
||||
|
@ -1202,10 +1202,10 @@
|
||||
::
|
||||
::::
|
||||
++ aqel :: aqel:ze
|
||||
|= lag=(map path blob) :: fix lat
|
||||
|= [lag=(map path blob) sta=(map lobe blob)] :: fix lat
|
||||
^- [(map lobe blob) (map path lobe)]
|
||||
%+ roll (~(tap by lag) ~)
|
||||
|= [[pat=path bar=blob] [lut=_lat gar=(map path lobe)]]
|
||||
|= [[pat=path bar=blob] [lut=_sta gar=(map path lobe)]]
|
||||
?~ (~(has by lut) p.bar)
|
||||
[lut (~(put by gar) pat p.bar)]
|
||||
:- (~(put by lut) p.bar bar)
|
||||
@ -1268,7 +1268,7 @@
|
||||
=+ ^= per
|
||||
?~ par ~
|
||||
~[u.par]
|
||||
=+ gar=(aqel (azal q.lem))
|
||||
=+ gar=(aqel (azal q.lem) lat)
|
||||
:- %^ zoal per +.gar wen :: from existing diff
|
||||
-.gar :: fix lat
|
||||
::
|
||||
@ -1514,10 +1514,10 @@
|
||||
=+ gar=(merge foreign-head our-head now (strat gem))
|
||||
=+ yak=-.gar
|
||||
=+ hek=+.gar
|
||||
=. lat -:(aqel hek) :: add new blobs
|
||||
=. hut (~(put by hut) r.yak yak)
|
||||
=. lat -:(aqel hek ~) :: add new blobs
|
||||
=. hut (~(put by _(map tako yaki)) r.yak yak)
|
||||
=. let +(let)
|
||||
=. hit (~(put by hit) let r.yak)
|
||||
=. hit (~(put by _(map ,@ud tako)) let r.yak)
|
||||
[~ [~ [let hit hut lat]]]
|
||||
%conf !!
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user