-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix initial change listing with statuses #351
Fix initial change listing with statuses #351
Conversation
Created using spr 1.3.5
|
let status = entry.status(); | ||
let mut change_type = FileChangeType::Update; | ||
if status.is_wt_deleted() { | ||
change_type = FileChangeType::Delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a difference in the way we handle this status type in cache invalidation?
Also, if the files is untracked, do they have all the different statuses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is, the invalidations are registered against specific file change events (update/create/delete)
@@ -309,15 +309,41 @@ pub fn get_changed_files_from_git( | |||
old_commit: &git2::Commit<'_>, | |||
new_commit: &git2::Commit<'_>, | |||
) -> anyhow::Result<Vec<FileChangeEvent>> { | |||
let mut changed_files = Vec::new(); | |||
|
|||
// list current dirty files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the difference with vcs_list_dirty_files
and why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will unify but this is doing slightly different work ;
There's a snapshot side and a start-up side. We actually needed to reconcile the snapshot with the dirty files here and re-hash the contents.
Fix VCS events since listing to include currently untracked files. Test Plan: cargo test Pull Request: #351
Fix VCS events since listing to include currently untracked files.
Test Plan: cargo test