mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-16 16:05:00 +00:00
refactor: rewrite git flow init
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
4d5be9f280
commit
3386cb177b
3 changed files with 40 additions and 18 deletions
|
@ -1459,8 +1459,15 @@ namespace SourceGit.ViewModels
|
|||
init.Icon = App.CreateMenuIcon("Icons.Init");
|
||||
init.Click += (_, e) =>
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
if (_currentBranch == null)
|
||||
{
|
||||
App.RaiseException(_fullpath, "Git flow init failed: No branch found!!!");
|
||||
}
|
||||
else if (CanCreatePopup())
|
||||
{
|
||||
ShowPopup(new InitGitFlow(this));
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(init);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue