Skip to content
go-libfossil Check-in [858c20561f]
Login

Check-in [858c20561f]

Overview
Comment:fix(undo): save and restore symlinks as fossil's undo does

Move checkout's link-aware diskView into vfile.Disk, so checkout, undo and stash share one RepoFILE view: Stat, Read, Write (which deletes a link before writing, makes a symlink when allow-symlinks is on, creates the directory and sets the executable bit as file_setexe does), SetExe, MTime and Remove. The allow-symlinks setting is read by vfile.OpenDisk.

undo.Save, Undo, Redo, Swap, ReadFile and RestoreFiles now take a Disk: a symlink is read as its target's name and recorded with isLink, and is deleted and made a symlink again on restore, as undo_save and undo_one do, so Undo of an Update no longer writes through a link.

Timelines: family | ancestors | descendants | both | main | trunk | feat/submanifest-reader
Files: files | file ages | folders
SHA3-256: 858c20561fbe72c0a55085333a3e040d180afbca9d4aa63c03ec13adc9c4bf60
User & Date: [email protected] on 2026-10-19 22:58:21.000
Other Links: branch diff | manifest | tags
Context
2026-10-19
23:02
fix(checkout): revert a symlink as fossil's revert does

restoreCommitted writes through vfile.Disk with the row's islink, so a repointed link is made a link to its committed target again instead of having that name written into the file it points to. check-in: 6a440bc42f user: [email protected] tags: feat/submanifest-reader, main, trunk

22:58
fix(undo): save and restore symlinks as fossil's undo does

Move checkout's link-aware diskView into vfile.Disk, so checkout, undo and stash share one RepoFILE view: Stat, Read, Write (which deletes a link before writing, makes a symlink when allow-symlinks is on, creates the directory and sets the executable bit as file_setexe does), SetExe, MTime and Remove. The allow-symlinks setting is read by vfile.OpenDisk.

undo.Save, Undo, Redo, Swap, ReadFile and RestoreFiles now take a Disk: a symlink is read as its target's name and recorded with isLink, and is deleted and made a symlink again on restore, as undo_save and undo_one do, so Undo of an Update no longer writes through a link. check-in: 858c20561f user: [email protected] tags: feat/submanifest-reader, main, trunk

22:50
test: undo, revert and stash of a repointed symlink (red) check-in: 5a08dc00df user: [email protected] tags: feat/submanifest-reader, main, trunk
Changes