mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 14:08:06 -05:00
This adds a new field to the file information we keep, the "previous blocks hash". This is the hash of the file contents as it was in its previous incarnation. That is, every scan that updates the blocks hash will move the current hash to the "previous" field. This enables an addition to the conflict detection algorithm: if the file to be synced is in conflict with the current file on disk (version-counter wise), but it indicates that it was based on the precise contents we have (new.prevBlocksHash == current.blocksHash), then it's not really a conflict. Signed-off-by: Jakob Borg <jakob@kastelo.net>