fix(merge): write Cohen Transform conflict markers to working tree
When muse merge detected a conflict, conflicting files were left at their ours version with no markers — making it impossible to see both sides of the conflict. Fixed by running three_way_merge_lines (the Cohen Transform) over the ours/theirs/base blobs from the object store and writing the diff3-style marker output to the working tree, matching the pattern already used in checkout.py. Binary files are left at ours.
Also corrects test_conflicting_file_left_at_ours_version_on_conflict which was asserting the buggy behavior.
sha256:681cefc30edc150defde5affbfae111caa9bca1282b6f1662f08dd1f0bf5ca5b
sha
+30
~2
−1
symbols
sha256:0ded11a6c78814ec95926978ece5e9dac6b3f9ee4feada182c44c3e2dc78077c
snapshot
+30
symbols added
~2
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes
33 symbols
+
TestConflictMarkersWrittenToWorkingTree
class
class TestConflictMarkersWrittenToWorkingTree L108–315
+
test_binary_conflict_file_not_garbled
method
method test_binary_conflict_file_not_garbled L242–266
+
test_conflict_file_contains_base_content
method
method test_conflict_file_contains_base_content L198–213
+
test_conflict_file_contains_end_marker
method
method test_conflict_file_contains_end_marker L147–162
+
test_conflict_file_contains_ours_content
method
method test_conflict_file_contains_ours_content L164–179
+
test_conflict_file_contains_ours_marker
method
method test_conflict_file_contains_ours_marker L111–128
+
test_conflict_file_contains_theirs_content
method
method test_conflict_file_contains_theirs_content L181–196
+
test_conflict_file_contains_theirs_separator
method
method test_conflict_file_contains_theirs_separator L130–145
+
test_merge_state_still_records_conflict_path
method
method test_merge_state_still_records_conflict_path L268–287
+
test_multi_file_conflict_all_files_get_markers
method
method test_multi_file_conflict_all_files_get_markers L289–315
+
test_non_conflicting_file_has_no_markers
method
method test_non_conflicting_file_has_no_markers L215–240
−
test_conflicting_file_left_at_ours_version_on_conflict
method
method test_conflicting_file_left_at_ours_version_on_conflict L259–295
+
test_conflicting_file_gets_conflict_markers
method
method test_conflicting_file_gets_conflict_markers L259–298
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:681cefc30edc150defde5affbfae111caa9bca1282b6f1662f08dd1f0bf5ca5b --body "your comment"
No comments yet. Be the first to start the discussion.