Detailed changes
@@ -212,7 +212,7 @@ impl GitBlame {
let git_store = project.read(cx).git_store().clone();
let git_store_subscription =
cx.subscribe(&git_store, move |this, _, event, cx| match event {
- GitStoreEvent::RepositoryUpdated(_, RepositoryEvent::Updated, _)
+ GitStoreEvent::RepositoryUpdated(_, RepositoryEvent::Updated { .. }, _)
| GitStoreEvent::RepositoryAdded(_)
| GitStoreEvent::RepositoryRemoved(_) => {
log::debug!("Status of git repositories updated. Regenerating blame data...",);
@@ -408,8 +408,12 @@ impl GitPanel {
this.active_repository = git_store.read(cx).active_repository();
this.schedule_update(true, window, cx);
}
- GitStoreEvent::RepositoryUpdated(_, RepositoryEvent::Updated, true) => {
- this.schedule_update(true, window, cx);
+ GitStoreEvent::RepositoryUpdated(
+ _,
+ RepositoryEvent::Updated { full_scan },
+ true,
+ ) => {
+ this.schedule_update(*full_scan, window, cx);
}
GitStoreEvent::RepositoryUpdated(_, _, _) => {}
GitStoreEvent::RepositoryAdded(_) | GitStoreEvent::RepositoryRemoved(_) => {
@@ -154,7 +154,7 @@ impl ProjectDiff {
window,
move |this, _git_store, event, _window, _cx| match event {
GitStoreEvent::ActiveRepositoryChanged(_)
- | GitStoreEvent::RepositoryUpdated(_, RepositoryEvent::Updated, true) => {
+ | GitStoreEvent::RepositoryUpdated(_, RepositoryEvent::Updated { .. }, true) => {
*this.update_needed.borrow_mut() = ();
}
_ => {}
@@ -258,7 +258,7 @@ pub enum RepositoryState {
#[derive(Clone, Debug)]
pub enum RepositoryEvent {
- Updated,
+ Updated { full_scan: bool },
MergeHeadsChanged,
}
@@ -3521,7 +3521,7 @@ impl Repository {
if update.is_last_update {
self.snapshot.scan_id = update.scan_id;
}
- cx.emit(RepositoryEvent::Updated);
+ cx.emit(RepositoryEvent::Updated { full_scan: true });
Ok(())
}
@@ -3866,7 +3866,7 @@ impl Repository {
.ok();
}
}
- cx.emit(RepositoryEvent::Updated);
+ cx.emit(RepositoryEvent::Updated { full_scan: false });
})
},
);
@@ -4106,7 +4106,7 @@ async fn compute_snapshot(
|| branch != prev_snapshot.branch
|| statuses_by_path != prev_snapshot.statuses_by_path
{
- events.push(RepositoryEvent::Updated);
+ events.push(RepositoryEvent::Updated { full_scan: true });
}
let mut current_merge_conflicts = TreeSet::default();