mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
ux: disable commit button when commit message is empty
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
7cda7211f1
commit
da38b72ee5
3 changed files with 31 additions and 11 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue