Skip to content

Merge maps and lists in YAML blocks instead of left-biased union #4057

@hatzka-nezumi

Description

@hatzka-nezumi

Always ignoring extant keys (pure left-biased union) can be a bit counterintuitive. It may be better to merge the contents of mappings and lists, then use left-biased union for conflicting scalar values, so that

---
one:
    first: 1
---
---
one:
    first: 2
    second: 3
---

should simplify to

---
one:
    first: 1
    second: 3
---

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions