pub fn sync_state(
current: Option<ServerFile<'_>>,
history: &[(i32, &str)],
local_sha256: Option<&str>,
base: Option<&BaseVersion>,
) -> FileSyncStateExpand description
Compares a local file (local_sha256) with the server file.
history holds (version, sha256) of every version of the file. Without
a stated base, local content equal to an older version counts as
outdated, and unknown content as modified (the base is then assumed to be
the current version). With a base, local content that differs from both
the base and the current version is a conflict once the server moved on.