Skip to content

Commit f7ecc0e

Browse files
author
Stephan Dilly
committed
do not fetch filetree on empty repo (closes #859)
1 parent 2402777 commit f7ecc0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tabs/files.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ impl FilesTab {
4949
///
5050
pub fn update(&mut self) -> Result<()> {
5151
if self.is_visible() {
52-
self.files.set_commit(sync::get_head(CWD)?)?;
52+
if let Ok(head) = sync::get_head(CWD) {
53+
self.files.set_commit(head)?;
54+
}
5355
}
5456

5557
Ok(())

0 commit comments

Comments
 (0)