reduce slow git-calls further

This commit is contained in:
Stephan Dilly 2020-03-20 19:24:02 +01:00
parent 5c771b0bbc
commit 3ce4a51b04
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ gitui
* [x] inspect diffs
* [x] commit
* [x] [input polling in thread](assets/perf_compare.jpg)
* [ ] only ask git when necessary. maybe in a worker thread?
* [x] only ask git when necessary. maybe in a worker thread?
* [ ] show content of new files
* [ ] discard untracked files (remove)
* [ ] use [notify](https://crates.io/crates/notify) to watch git

View File

@ -143,11 +143,11 @@ impl App {
if !self.commit.is_visible() {
if self.index.event(ev) {
self.update();
self.update_diff();
return;
}
if self.index_wd.event(ev) {
self.update();
self.update_diff();
return;
}
if self.diff.event(ev) {
@ -318,7 +318,7 @@ impl App {
}
};
self.update();
self.update_diff();
}
}