Use entry_id on File instead of worktree::Diff to detect when buffers' files change
Rather than computing a diff after processing a batch of FSEvents, we instead detect renames as we're inserting entries. We store an entry_id on the File object that is owned by each buffer, and use this to detect when the path of the File has changed. We now also manage all File-related state and event emission for Buffers in the LocalWorktree, since the logic will need to be totally different in the remote case. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
e80439daaa
commit
34963ac80d
7 changed files with 396 additions and 553 deletions
|
@ -618,6 +618,7 @@ mod tests {
|
|||
abs_path: PathBuf::new().into(),
|
||||
ignores: Default::default(),
|
||||
entries: Default::default(),
|
||||
paths_by_id: Default::default(),
|
||||
removed_entry_ids: Default::default(),
|
||||
root_name: Default::default(),
|
||||
root_char_bag: Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue