diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-12-11 08:32:21 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-12-11 08:32:21 +0800 |
| commit | 74ee31689a620c2220b50d7c13abf36f80666047 (patch) | |
| tree | e0ba4e0ec0c936958246cdc5b71156d2fc12b5bc /crates/vcs_data/src/data/local/local_sheet.rs | |
| parent | 4cacb598fe0a13b950bcb38fa4275f1777621b03 (diff) | |
Match moved files using latest hash instead of initial hash
Diffstat (limited to 'crates/vcs_data/src/data/local/local_sheet.rs')
| -rw-r--r-- | crates/vcs_data/src/data/local/local_sheet.rs | 11 |
1 files changed, 10 insertions, 1 deletions
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<String>, } 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, } } } |
