qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

Status should not use byte comparison for bodies #891

Closed dustmop closed 5 years ago

dustmop commented 5 years ago

The function CalculateStateTransition in fsi/status.go is reading body files using ioutil.Readall. This makes status calculations sensitive to non-significant changes to the body, like whitespace or other changes that aren't related to the structured data. Instead, it should be using entryReaders from dsio to do the comparisons, bailing out as soon as it finds a change.

This will partially fix https://github.com/qri-io/qri/issues/883.

dustmop commented 5 years ago

Fixed by https://github.com/qri-io/qri/pull/926, and now components make this behavior much more modular.