| Comment: | Merge branch 'wip/merge-renames' into feat/horizon-cones
Merges follow renames as fossil's merge does: its name pivot, find_filename_changes and file matching ported, so a file renamed on one side and edited on the other merges into the renamed file. Matches fossil 2.28 on 13 rename scenarios. Repo.Merge no longer brings back files the merge deleted. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk | feat/horizon-cones |
| Files: | files | file ages | folders |
| SHA3-256: |
4bccd3f803bce40612064ad83758c036 |
| User & Date: | [email protected] on 2026-10-22 21:16:43.000 |
| Other Links: | branch diff | manifest | tags |
|
2026-10-22
| ||
| 21:16 | docs(changelog): merges follow renames; Repo.Merge keeps deletions check-in: cb4284230b user: [email protected] tags: feat/horizon-cones, trunk | |
| 21:16 |
Merge branch 'wip/merge-renames' into feat/horizon-cones
Merges follow renames as fossil's merge does: its name pivot, find_filename_changes and file matching ported, so a file renamed on one side and edited on the other merges into the renamed file. Matches fossil 2.28 on 13 rename scenarios. Repo.Merge no longer brings back files the merge deleted. check-in: 4bccd3f803 user: [email protected] tags: feat/horizon-cones, trunk | |
| 21:16 |
fix(merge): follow renames as fossil's merge does
A file renamed on one side and edited on the other was merged as a deletion plus an addition: the edit was kept under the old name and the renamed copy arrived beside it, so fossil and go-libfossil left different trees and recorded different changes for the same merge. Port fossil's rename matching (merge.c merge_cmd): the name pivot nid (pivot_find(1) of M and V, rerun against P when they differ), the renames from nid to V, P and M (path.c find_filename_changes, one way, now path.FilenameChanges), and the fv table those fill (add_renames, the nid!=pid name fill-in, then the files of V, P and M) as merge.MatchFiles/FollowRenames. Checkout.Merge classifies each matched file as before and renames on disk and in vfile a file the merged-in version renamed and the checkout did not, after the other steps, moving swapped names together and setting aside a removed or deleted row that held the new name. Where fossil would rename over a kept tracked file or an untracked one, Merge refuses, as it already does for adds. Repo.Merge matches files the same way and commits the merged tree whole, recording the rename (FileToCommit.OldName); the whole-tree commit also stops it carrying forward a file the merge deleted. The CLI prints RENAME lines where fossil's merge prints them. check-in: 2c3a78cf5e user: [email protected] tags: feat/horizon-cones, trunk | |
| 21:04 | docs: the clone records the horizon cursor check-in: 22bbf792b3 user: [email protected] tags: feat/horizon-cones, trunk | |