clay: cleaner no-op detection

Only no-op if the incoming commit's parent is the old head of the desk.
Also move the printing near the end so we can know exactly if anything
changed.
This commit is contained in:
Philip Monk 2020-08-25 18:00:31 -07:00
parent d5596eb1a3
commit f606d2e3d6
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC

View File

@ -1365,7 +1365,6 @@
|^
|= [updated=? =yoki =rang]
^+ ..park
=/ abort ..park
=: hut.ran (~(uni by hut.rang) hut.ran)
lat.ran (~(uni by lat.rang) lat.ran)
==
@ -1374,12 +1373,12 @@
%& q.p.yoki
%| (~(run by q.p.yoki) |=(=lobe |+lobe))
==
=/ old-lobes=(map path lobe)
=/ old-yaki
?: =(0 let.dom)
~
q:(aeon-to-yaki:ze let.dom)
*yaki
(aeon-to-yaki:ze let.dom)
=/ [deletes=(set path) changes=(map path (each page lobe))]
(get-changes old-lobes new-data)
(get-changes q.old-yaki new-data)
~| [from=let.dom deletes=deletes changes=~(key by changes)]
::
:: promote ford cache
@ -1392,13 +1391,6 @@
|(!=(~ sys-changes) !=(~ (need-vane-update changes)))
==
(sys-update yoki new-data changes)
=. ..park
%- emil
=/ changed=(set path) ~(key by changes)
=/ existed=(set path) ~(key by old-lobes)
%^ print deletes
(~(int in changed) existed)
(~(dif in changed) existed)
:: clear caches if zuse reloaded
::
=/ is-zuse-new=? !=(~ sys-changes)
@ -1409,7 +1401,7 @@
=. fer.dom `(build-reef fer.dom ~(key by changes) new-data)
=? ank.dom is-zuse-new *ankh
=? changes is-zuse-new
(changes-for-upgrade old-lobes deletes changes)
(changes-for-upgrade q.old-yaki deletes changes)
::
=/ =args:ford:fusion
[zuse:(need fer.dom) ank.dom deletes changes lat.ran fod.dom]
@ -1431,8 +1423,10 @@
==
:: if we didn't change the data and it's not a merge commit, abort
::
?: &(?=([@ ~] p.p.yoki) =(data old-lobes))
abort
:: very important to keep all permanent changes below this point
::
?: &(=([r.old-yaki ~] p.p.yoki) =(data q.old-yaki))
..park
=/ =yaki
?- -.yoki
%& (make-yaki p.p.yoki data now)
@ -1455,6 +1449,7 @@
(checkout-mime args deletes ~(key by changes))
=. mim.dom (apply-changes-to-mim mim.dom mim)
=. fod.dom ford-cache.args
=. ..park (emil (print q.old-yaki data))
::
wake:(ergo mim)
::
@ -1744,8 +1739,14 @@
:: Print notification to console
::
++ print
|= [deletes=(set path) changes=(set path) additions=(set path)]
|= [old=(map path lobe) new=(map path lobe)]
^- (list move)
=/ [deletes=(set path) upserts=(map path (each page lobe))]
(get-changes old (~(run by new) |=(=lobe |+lobe)))
=/ upsert-set ~(key by upserts)
=/ old-set ~(key by old)
=/ changes=(set path) (~(int in upsert-set) old-set)
=/ additions=(set path) (~(dif in upsert-set) old-set)
?~ hun
~
?: =(0 let.dom)