A switch reads left-out files twice when they differ from the target #110

Closed
opened 2026-10-24 23:39:38 -05:00 by ethan-hann · 0 comments
Owner

Since the index refresh after a switch (#104, D41.11), files matched by a game's Files to leave out rules whose content differs from the target are hashed by the refresh (their aligned index entries never match on stat) and again by the verify pass's git diff, which only skips them after git has read them. A game that leaves out a large cache would pay one extra full read of it per switch. Limiting the verify diff with --pathspec-from-file does not work (git diff refuses it, exit 129); doing it properly means passing paths in batches on the command line or excluding the left-out paths with pathspec magic. Measure on a game with a big left-out folder before changing anything.

Since the index refresh after a switch (#104, D41.11), files matched by a game's Files to leave out rules whose content differs from the target are hashed by the refresh (their aligned index entries never match on stat) and again by the verify pass's `git diff`, which only skips them after git has read them. A game that leaves out a large cache would pay one extra full read of it per switch. Limiting the verify diff with `--pathspec-from-file` does not work (`git diff` refuses it, exit 129); doing it properly means passing paths in batches on the command line or excluding the left-out paths with pathspec magic. Measure on a game with a big left-out folder before changing anything.
ethan-hann added this to the Later milestone 2026-10-24 23:39:38 -05:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#110
No description provided.