warn if commit fails (like when no name is set) (#74)

This commit is contained in:
Stephan Dilly 2020-05-20 11:26:56 +02:00
parent 28550f7262
commit 25c07a839c

View file

@ -135,7 +135,17 @@ impl CommitComponent {
return;
}
sync::commit(CWD, &self.msg).unwrap();
if let Err(e) = sync::commit(CWD, &self.msg) {
error!("commit error: {}", &e);
self.queue.borrow_mut().push_back(
InternalEvent::ShowMsg(format!(
"commit failed:\n{}",
&e
)),
);
return;
}
if let HookResult::NotOk(e) =
sync::hooks_post_commit(CWD).unwrap()
{