Expand description
Shared CLI helpers for the resolvable-conflict workflow (#177).
Materialises conflict material into the worktree + index, classifies
each conflict into a presentation class, and scans for leftover
conflict markers so --continue can refuse to proceed while the user
has not resolved a textual conflict.
Materialisation always honours the #176 restore guards: callers run
super::ensure_restore_safe over the conflict-time tree before
invoking materialize_conflicts, so dirty tracked files and
untracked collisions are never clobbered.
Enums§
- Conflict
Class - Classification of how a conflicting path is presented to the user.
Functions§
- classify
- Classify a single conflict given its blob contents.
- ensure_
abort_ safe - Pre-abort safety gate: refuse the abort before it mutates anything
when restoring to
target_treewould overwrite genuine user work on a path that is not part of the recorded conflict set. - ensure_
conflict_ paths_ staged - Refuse
--continuewhen a conflicted path’s worktree resolution does not match what is staged in the index. The final tree is built from the index, so any unstaged resolution would be silently dropped and then overwritten by the worktree restore (#269). - first_
unresolved_ marker - materialize_
conflicts - Materialise every conflict into the worktree and stage the ours-side blob into the index so each conflicting path is “resolvable”:
- reset_
conflict_ paths - Discard conflict material on the recorded conflict paths, resetting
each back to its content in
target_tree(the pre-op HEAD): write the target blob into the worktree (or delete the file when the path is absent fromtarget_tree) and align the index entry.