Module merge_driver

Module merge_driver 

Source
Expand description

Git merge driver for spec files.

This module implements a custom merge driver for .chant/specs/*.md files that intelligently resolves frontmatter conflicts while preserving body content.

Structs§

MergeDriverSetupResult
Result of setting up the merge driver
ParsedSpec
Result of parsing a spec file into frontmatter and body

Enums§

MergeRule
Merge strategy for a frontmatter field

Functions§

assemble_spec
Assemble a spec file from frontmatter and body
get_merge_rule
Get merge rule for a field (default to PreferOurs if not specified)
get_setup_instructions
Generate git configuration instructions for the merge driver
merge_body
Merge body content using git’s 3-way merge
merge_frontmatter
Merge frontmatter from base, ours, and theirs using declarative rules
parse_spec_file
Parse a spec file into frontmatter and body components
run_merge_driver
Run the merge driver
serialize_frontmatter
Serialize frontmatter back to YAML string
setup_merge_driver
Set up the merge driver for the current repository