You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 73c143c
Browse filesBrowse the repository at this point in the historyBrowse files
gluck
committed
form: one projection, one constructor, and comments that say what code does
Answers four keel threads on bcfa3f6.
## the acrobatics
Taking a patch, splitting it into dotted keys, and rebuilding it against an
empty snapshot. Six sites did this to add one key. Patches compose with Merge:
form.Merge(dress, form.Build(form.Snapshot{}, add, nil))
Outfit layering was the same shape at a larger scale: N patches decomposed to
key maps, unioned, rebuilt. It is a fold of Merge.
That rewrite also removed a silent bug. Leaves() returned a fresh map, so
p.Leaves()[k] = v wrote to a temporary and was discarded. Five sites did it,
including the aria_id and cwd stamps on every birth patch.
## the duplication
removed Leaves, Keys, Removes, IsEmpty, Creates, creationsOnly,
sortStrings, and four near-identical recursive walkers
kept Entries, Entry, Build
Entries walks the patch once and yields (path, before, after). Keys, removals
and set values are filters over it. IsEmpty was an alias for IsIdentity;
Creates was Build with an empty base.
patch.go: 220 lines removed, 59 added.
## comments
Removed the inline justifications, the capitals used for emphasis, and every
reference to how the code used to be. The git history holds that.
0 commit comments