do not fetch filetree on empty repo (closes #859)

This commit is contained in:
Stephan Dilly 2021-08-19 11:05:10 +02:00
parent 2402777427
commit f7ecc0e194

View File

@ -49,7 +49,9 @@ impl FilesTab {
///
pub fn update(&mut self) -> Result<()> {
if self.is_visible() {
self.files.set_commit(sync::get_head(CWD)?)?;
if let Ok(head) = sync::get_head(CWD) {
self.files.set_commit(head)?;
}
}
Ok(())