mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 03:45:00 +00:00
refactor: rewrite git-flow integration
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
6fa454ace8
commit
4d5be9f280
9 changed files with 197 additions and 166 deletions
|
@ -975,8 +975,8 @@ namespace SourceGit.ViewModels
|
|||
|
||||
if (!_repo.IsBare)
|
||||
{
|
||||
var detect = Commands.GitFlow.DetectType(_repo.FullPath, _repo.Branches, current.Name);
|
||||
if (detect.IsGitFlowBranch)
|
||||
var type = _repo.GetGitFlowType(current);
|
||||
if (type != Models.GitFlowBranchType.None)
|
||||
{
|
||||
var finish = new MenuItem();
|
||||
finish.Header = App.Text("BranchCM.Finish", current.Name);
|
||||
|
@ -984,7 +984,7 @@ namespace SourceGit.ViewModels
|
|||
finish.Click += (_, e) =>
|
||||
{
|
||||
if (_repo.CanCreatePopup())
|
||||
_repo.ShowPopup(new GitFlowFinish(_repo, current, detect.Type, detect.Prefix));
|
||||
_repo.ShowPopup(new GitFlowFinish(_repo, current, type));
|
||||
e.Handled = true;
|
||||
};
|
||||
submenu.Items.Add(finish);
|
||||
|
@ -1063,8 +1063,8 @@ namespace SourceGit.ViewModels
|
|||
|
||||
if (!_repo.IsBare)
|
||||
{
|
||||
var detect = Commands.GitFlow.DetectType(_repo.FullPath, _repo.Branches, branch.Name);
|
||||
if (detect.IsGitFlowBranch)
|
||||
var type = _repo.GetGitFlowType(branch);
|
||||
if (type != Models.GitFlowBranchType.None)
|
||||
{
|
||||
var finish = new MenuItem();
|
||||
finish.Header = App.Text("BranchCM.Finish", branch.Name);
|
||||
|
@ -1072,7 +1072,7 @@ namespace SourceGit.ViewModels
|
|||
finish.Click += (_, e) =>
|
||||
{
|
||||
if (_repo.CanCreatePopup())
|
||||
_repo.ShowPopup(new GitFlowFinish(_repo, branch, detect.Type, detect.Prefix));
|
||||
_repo.ShowPopup(new GitFlowFinish(_repo, branch, type));
|
||||
e.Handled = true;
|
||||
};
|
||||
submenu.Items.Add(finish);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue