mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
ux: disable commit button when commit message is empty
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -1652,6 +1652,9 @@ namespace SourceGit.ViewModels
|
||||
|
||||
private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty = false, bool confirmWithFilter = false)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_commitMessage))
|
||||
return;
|
||||
|
||||
if (!_repo.CanCreatePopup())
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "Repository has unfinished job! Please wait!");
|
||||
@@ -1672,12 +1675,6 @@ namespace SourceGit.ViewModels
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_commitMessage))
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "Commit without message is NOT allowed!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_useAmend && !allowEmpty)
|
||||
{
|
||||
if ((autoStage && _count == 0) || (!autoStage && _staged.Count == 0))
|
||||
|
||||
Reference in New Issue
Block a user