mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
warn if commit fails (like when no name is set) (#74)
This commit is contained in:
parent
28550f7262
commit
25c07a839c
1 changed files with 11 additions and 1 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue