Artifact c5565ef5ab6774230f92436b4022f3a7f7536a4dca0df8a966c716b2becbbf1d:
- File
cli/repo_merge.go
-
2026-10-22 21:16:18
— part of check-in
[2c3a78cf5e]
on branch feat/horizon-cones
— 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. (user: [email protected], size: 3228) [annotate] [blame] [check-ins using]
-
2026-10-22 21:16:43
— part of check-in
[4bccd3f803]
on branch feat/horizon-cones
— 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. (user: [email protected], size: 3228) [annotate] [blame] [check-ins using]
- 2026-10-22 21:28:23 — part of check-in [31766dc383] on branch feat/horizon-cones — Merge branch 'feat/horizon-cones' into wip/rebuild-perf (user: [email protected], size: 3228) [annotate] [blame] [check-ins using]
-
2026-10-22 21:16:18
— part of check-in
[2c3a78cf5e]
on branch feat/horizon-cones
— fix(merge): follow renames as fossil's merge does