From 74ee31689a620c2220b50d7c13abf36f80666047 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 11 Dec 2025 08:32:21 +0800 Subject: Match moved files using latest hash instead of initial hash --- crates/vcs_data/src/data/local/local_sheet.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crates/vcs_data/src/data/local/local_sheet.rs') diff --git a/crates/vcs_data/src/data/local/local_sheet.rs b/crates/vcs_data/src/data/local/local_sheet.rs index f1daaba..378d589 100644 --- a/crates/vcs_data/src/data/local/local_sheet.rs +++ b/crates/vcs_data/src/data/local/local_sheet.rs @@ -45,6 +45,7 @@ pub struct LocalMappingMetadata { pub(crate) hash_when_updated: String, /// Time when the file was downloaded to the local workspace + #[serde(rename = "time")] pub(crate) time_when_updated: SystemTime, /// Size of the file when downloaded to the local workspace @@ -52,7 +53,7 @@ pub struct LocalMappingMetadata { pub(crate) size_when_updated: u64, /// Version description when the file was downloaded to the local workspace - #[serde(rename = "version_desc")] + #[serde(rename = "desc")] pub(crate) version_desc_when_updated: VirtualFileVersionDescription, /// Version when the file was downloaded to the local workspace @@ -64,10 +65,16 @@ pub struct LocalMappingMetadata { pub(crate) mapping_vfid: VirtualFileId, /// Latest modifiy check time + #[serde(rename = "check_time")] pub(crate) last_modifiy_check_time: SystemTime, /// Latest modifiy check result + #[serde(rename = "modified")] pub(crate) last_modifiy_check_result: bool, + + /// Latest modifiy check hash result + #[serde(rename = "current_hash")] + pub(crate) last_modifiy_check_hash: Option, } impl LocalSheetData { @@ -109,6 +116,7 @@ impl LocalMappingMetadata { mapping_vfid, last_modifiy_check_time, last_modifiy_check_result, + last_modifiy_check_hash: None, } } @@ -204,6 +212,7 @@ impl Default for LocalMappingMetadata { mapping_vfid: Default::default(), last_modifiy_check_time: SystemTime::now(), last_modifiy_check_result: false, + last_modifiy_check_hash: None, } } } -- cgit