Find all local-only change hashes. Returns the base32-encoded hashes of all changes that exist locally but not on the remote. # Arguments `local_entries` - Local history entries `remote_entries` - Remote changelist entries # Returns A vector of base32-encoded hashes of local-only changes.
(
local_entries: &[HistoryEntry],
remote_entries: &[ChangelistEntry],
)
| 154 | /// |
| 155 | /// A vector of base32-encoded hashes of local-only changes. |
| 156 | pub fn find_local_only_changes( |
| 157 | local_entries: &[HistoryEntry], |
| 158 | remote_entries: &[ChangelistEntry], |
| 159 | ) -> Vec<String> { |
| 160 | let remote_hashes: HashSet<String> = remote_entries.iter().map(|e| e.hash.clone()).collect(); |
| 161 | |
| 162 | local_entries |
| 163 | .iter() |
| 164 | .filter(|e| !remote_hashes.contains(&e.hash.to_base32())) |
| 165 | .map(|e| e.hash.to_base32()) |
| 166 | .collect() |
| 167 | } |
| 168 | |
| 169 | // Change Data Operations |
| 170 |